getResultType();getParameterType(String).buildContentAssistProposals(int).buildBasicRefactoringTool() provides support for generating the delta of the
refactoring operation through a collection of TextEdit objects.buildRefactoringTool() provides support for refactoring the JPQL query through
the editable StateObject
and once all refactoring operations have been executed, the IJPQLQueryFormatter will
generate a new string representation of the JPQL query.Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
| Modifier and Type | Field and Description |
|---|---|
| private AbstractContentAssistVisitor | contentAssistVisitor
This visitor is responsible to gather the possible proposals based on the position of the caret within the JPQL query. |
| private AbstractGrammarValidator | grammarValidator
This visitor is responsible to visit the entire parsed tree representation of the JPQL query and to validate its content based on the JPQL grammar. |
| private JPQLGrammar | jpqlGrammar
The |
| private JPQLQueryContext | queryContext
The context used to query information about the JPQL query. |
| private AbstractSemanticValidator | semanticValidator
This visitor is responsible to visit the entire parsed tree representation of the JPQL query and to validate the semantic of the information. |
| Access | Constructor and Description |
|---|---|
| public | AbstractJPQLQueryHelper(JPQLGrammar
The jpqlGrammar)JPQLGrammar that will determine how to parse JPQL queriesCreates a new |
| protected | AbstractJPQLQueryHelper(JPQLQueryContext
The context used to query information about the JPQL query queryContext)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public abstract BasicRefactoringTool | Returns: The concrete instance ofRefactoringToolCreates the concrete instance of the tool that can refactor the content of a JPQL query. |
| public ContentAssistProposals | Returns: The list of valid proposals regrouped by categoriesThe position within the query for which a list of possible choices are created
for completing the query position)Retrieves the possibles choices that can complete the query from the given position within the query. |
| public ContentAssistProposals | Returns: The list of valid proposals regrouped by categoriesThe position within the query for which a list of possible choices are created
for completing the query position, ContentAssistExtension This extension can be used to provide additional information that is outside
the scope of simply providing JPA metadata information, such as table names, column names,
class names extension)Retrieves the possibles choices that can complete the query from the given position within the query. |
| protected abstract AbstractContentAssistVisitor | Returns: A new concrete instance ofAbstractContentAssistVisitorThe context used to query information about the JPQL query queryContext)Creates the concrete instance of the content assist visitor that will give the possible choices based on the position of the cursor within the JPQL query. |
| protected abstract AbstractGrammarValidator | Returns: A new concrete instance ofAbstractGrammarValidatorThe context used to query information about the JPQL query jpqlGrammar)Creates the concrete instance of the validator that will grammatically validate the JPQL query. |
| protected abstract JPQLQueryContext | Returns: A newJPQLQueryContextThe JPQL grammar that is required for dictating how the JPQL query will be
parsed. It is also used by validation and by the content assist jpqlGrammar)Creates a context that will be used to store and retrieve information about the JPQL query. |
| protected Comparator | Returns: NumericTypeComparatorCreates the |
| public abstract RefactoringTool | Returns: The concrete instance ofRefactoringToolCreates the concrete instance of the tool that can refactor the content of a JPQL query. |
| protected abstract AbstractSemanticValidator | Returns: A new concrete instance ofAbstractSemanticValidatorThe context used to query information about the JPQL query queryContext)Creates the concrete instance of the validator that will semantically validate the JPQL query. |
| public void | |
| protected AbstractContentAssistVisitor | Returns: A concrete instance ofAbstractContentAssistVisitorReturns the visitor that can visit a JPQL query and based on the position of the cursor within the JPQL query and determines the valid proposals. |
| public JPQLGrammar | Returns: The grammar that was used to parse thisExpressionReturns the JPQL grammar that will be used to define how to parse a JPQL query. |
| protected AbstractGrammarValidator | |
| public JPQLExpression | Returns: The parsed JPQL queryReturns the root of the parsed tree representation of the JPQL query. |
| public IType | Returns: Either the closest type of the input parameter ornull if the type
couldn't be determinedThe name of the input parameter to retrieve its type, which needs to be
prepended by ':' or '?' parameterName)Retrieves, if it can be determined, the type of the given input parameter with the given name. |
| public String | Returns: The string created from the parsed tree representation of the original JPQL queryReturns the string representation of the parsed tree. |
| public IManagedTypeProvider | Returns: The container of managed typesReturns the provider for managed types (entities, embeddables, mapped superclasses). |
| public IQuery | Returns: The external form representing a named queryReturns the external form representing a named query. |
| public JPQLQueryContext | Returns: TheJPQLQueryContext that contains information contained in the JPQL queryReturns the |
| public IType | Returns: The result type of the JPQL query if it could accurately be calculated or theIType for Object if it could not be calculatedCalculates the type of the query result of the JPQL query. |
| protected AbstractSemanticValidator | |
| public IType | |
| public TypeHelper | Returns: A helper containing a collection of methods related toITypeReturns a helper that gives access to the most common |
| public ITypeRepository | Returns: The repository for classes, interfaces, enum types and annotationsReturns the repository that gives access to the application's types. |
| public void | setJPQLExpression(JPQLExpression
The parsed representation of the JPQL query to manipulate jpqlExpression)Sets the parsed tree representation of the JPQL query. |
| public void | |
| public List | |
| public void | validate(Expression
The parsed tree representation of the JPQL fragment to validate expression, List<JPQLQueryProblem> A non- problems)null list that will be used to store the problems if any was foundValidates the query by introspecting it grammatically and semantically. |
| public List | |
| public void | validateGrammar(Expression
The parsed tree representation of the query expression, List<JPQLQueryProblem> A non- problems)null list that will be used to store the problems if any was foundValidates the query by only introspecting it grammatically. |
| public List | |
| public void | validateSemantic(Expression
The parsed tree representation of the query expression, List<JPQLQueryProblem> A non- problems)null list that will be used to store the problems if any was foundValidates the query by only introspecting it semantically. |
| contentAssistVisitor | back to summary |
|---|---|
| private AbstractContentAssistVisitor contentAssistVisitor This visitor is responsible to gather the possible proposals based on the position of the caret within the JPQL query. | |
| grammarValidator | back to summary |
|---|---|
| private AbstractGrammarValidator grammarValidator This visitor is responsible to visit the entire parsed tree representation of the JPQL query and to validate its content based on the JPQL grammar. | |
| jpqlGrammar | back to summary |
|---|---|
| private JPQLGrammar jpqlGrammar The | |
| queryContext | back to summary |
|---|---|
| private JPQLQueryContext queryContext The context used to query information about the JPQL query. | |
| semanticValidator | back to summary |
|---|---|
| private AbstractSemanticValidator semanticValidator This visitor is responsible to visit the entire parsed tree representation of the JPQL query and to validate the semantic of the information. | |
| AbstractJPQLQueryHelper | back to summary |
|---|---|
| public AbstractJPQLQueryHelper(JPQLGrammar jpqlGrammar) Creates a new
| |
| AbstractJPQLQueryHelper | back to summary |
|---|---|
| protected AbstractJPQLQueryHelper(JPQLQueryContext queryContext) Creates a new
| |
| buildBasicRefactoringTool | back to summary |
|---|---|
| public abstract BasicRefactoringTool buildBasicRefactoringTool() Creates the concrete instance of the tool that can refactor the content of a JPQL query. This version simply provides the delta of the refactoring operations.
| |
| buildContentAssistProposals | back to summary |
|---|---|
| public ContentAssistProposals buildContentAssistProposals(int position) Retrieves the possibles choices that can complete the query from the given position within the query. Note Disposing of the internal data is not done automatically.
| |
| buildContentAssistProposals | back to summary |
|---|---|
| public ContentAssistProposals buildContentAssistProposals(int position, ContentAssistExtension extension) Retrieves the possibles choices that can complete the query from the given position within the query. Note Disposing of the internal data is not done automatically.
| |
| buildContentAssistVisitor | back to summary |
|---|---|
| protected abstract AbstractContentAssistVisitor buildContentAssistVisitor(JPQLQueryContext queryContext) Creates the concrete instance of the content assist visitor that will give the possible choices based on the position of the cursor within the JPQL query.
| |
| buildGrammarValidator | back to summary |
|---|---|
| protected abstract AbstractGrammarValidator buildGrammarValidator(JPQLGrammar jpqlGrammar) Creates the concrete instance of the validator that will grammatically validate the JPQL query.
| |
| buildJPQLQueryContext | back to summary |
|---|---|
| protected abstract JPQLQueryContext buildJPQLQueryContext(JPQLGrammar jpqlGrammar) Creates a context that will be used to store and retrieve information about the JPQL query.
| |
| buildNumericTypeComparator | back to summary |
|---|---|
| protected Comparator Creates the
| |
| buildRefactoringTool | back to summary |
|---|---|
| public abstract RefactoringTool buildRefactoringTool() Creates the concrete instance of the tool that can refactor the content of a JPQL query. This
version provides a way to manipulate the editable version of the JPQL query (
| |
| buildSemanticValidator | back to summary |
|---|---|
| protected abstract AbstractSemanticValidator buildSemanticValidator(JPQLQueryContext queryContext) Creates the concrete instance of the validator that will semantically validate the JPQL query.
| |
| dispose | back to summary |
|---|---|
| public void dispose() Disposes of the internal data. | |
| getContentAssistVisitor | back to summary |
|---|---|
| protected AbstractContentAssistVisitor getContentAssistVisitor() Returns the visitor that can visit a JPQL query and based on the position of the cursor within the JPQL query and determines the valid proposals.
| |
| getGrammar | back to summary |
|---|---|
| public JPQLGrammar getGrammar() Returns the JPQL grammar that will be used to define how to parse a JPQL query.
| |
| getGrammarValidator | back to summary |
|---|---|
| protected AbstractGrammarValidator getGrammarValidator() | |
| getJPQLExpression | back to summary |
|---|---|
| public JPQLExpression getJPQLExpression() Returns the root of the parsed tree representation of the JPQL query.
| |
| getParameterType | back to summary |
|---|---|
| public IType getParameterType(String parameterName) Retrieves, if it can be determined, the type of the given input parameter with the given name. The type will be guessed based on its location within expression. Note Both named and positional input parameter can be used. | |
| getParsedJPQLQuery | back to summary |
|---|---|
| public String getParsedJPQLQuery() Returns the string representation of the parsed tree.
| |
| getProvider | back to summary |
|---|---|
| public IManagedTypeProvider getProvider() Returns the provider for managed types (entities, embeddables, mapped superclasses).
| |
| getQuery | back to summary |
|---|---|
| public IQuery getQuery() Returns the external form representing a named query.
| |
| getQueryContext | back to summary |
|---|---|
| public JPQLQueryContext getQueryContext() Returns the
| |
| getResultType | back to summary |
|---|---|
| public IType getResultType() Calculates the type of the query result of the JPQL query.
See | |
| getSemanticValidator | back to summary |
|---|---|
| protected AbstractSemanticValidator getSemanticValidator() | |
| getType | back to summary |
|---|---|
| public IType getType(Class<?> type) Returns the | |
| getTypeHelper | back to summary |
|---|---|
| public TypeHelper getTypeHelper() Returns a helper that gives access to the most common
| |
| getTypeRepository | back to summary |
|---|---|
| public ITypeRepository getTypeRepository() Returns the repository that gives access to the application's types.
| |
| setJPQLExpression | back to summary |
|---|---|
| public void setJPQLExpression(JPQLExpression jpqlExpression) Sets the parsed tree representation of the JPQL query. If the expression was parsed outside of
the scope of this context, then this method has to be invoked before
| |
| setQuery | back to summary |
|---|---|
| public void setQuery(IQuery query) Sets the external form of the JPQL query, which will be parsed and information will be extracted for later access.
| |
| validate | back to summary |
|---|---|
| public List Validates the query by introspecting it grammatically and semantically.
| |
| validate | back to summary |
|---|---|
| public void validate(Expression expression, List<JPQLQueryProblem> problems) Validates the query by introspecting it grammatically and semantically.
| |
| validateGrammar | back to summary |
|---|---|
| public List Validates the query by only introspecting it grammatically.
| |
| validateGrammar | back to summary |
|---|---|
| public void validateGrammar(Expression expression, List<JPQLQueryProblem> problems) Validates the query by only introspecting it grammatically.
| |
| validateSemantic | back to summary |
|---|---|
| public List Validates the query by only introspecting it semantically.
| |
| validateSemantic | back to summary |
|---|---|
| public void validateSemantic(Expression expression, List<JPQLQueryProblem> problems) Validates the query by only introspecting it semantically.
| |