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.
AbstractGrammarValidator, AbstractSemanticValidator
| Modifier and Type | Class and Description |
|---|---|
| public static class | AbstractValidator.BypassChildCollectionExpressionVisitor
This visitor is responsible to traverse the children of a |
| public static class | AbstractValidator.BypassParentSubExpressionVisitor
This visitor is responsible to traverse the parent hierarchy and to skip |
| public static class | AbstractValidator.ChildrenCollectorVisitor
This visitor gathers the children of a |
| public static class | AbstractValidator.JPQLQueryBNFValidator
This visitor validates any |
| protected static class | |
| public static class | AbstractValidator.OwningClauseVisitor
This visitor retrieves the clause owning the visited |
| protected static class | AbstractValidator.OwningStatementVisitor
This visitor retrieves the statement owning the visited |
| protected static class | AbstractValidator.SubqueryVisitor
This visitor retrieves the statement owning the visited |
| Modifier and Type | Field and Description |
|---|---|
| private AbstractValidator. | bypassChildCollectionExpressionVisitor
This visitor is responsible to traverse the children of a |
| private AbstractValidator. | bypassParentSubExpressionVisitor
This visitor is responsible to traverse the parent hierarchy and to skip |
| private AbstractValidator. | childrenCollectorVisitor
This visitor gathers the children of a |
| private LiteralVisitor | literalVisitor
This visitor is used to retrieve a variable name from various type of
|
| private AbstractValidator. | |
| private AbstractValidator. | owningClauseVisitor
This visitor is responsible to traverse the parent hierarchy and to retrieve the owning clause
of the |
| private AbstractValidator. | owningStatementVisitor
This visitor is responsible to traverse the parent hierarchy and to retrieve the owning
statement of the |
| private Collection | problems
The list of |
| private AbstractValidator. | subqueryVisitor
This visitor determines whether the visited |
| private Map | validators
The |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addProblem(Expression
The expression, int Expression that is either not following the BNF grammar or that
has semantic problemsThe position where the problem was encountered startPosition, int The position where the problem ends, inclusively endPosition, String The key used to retrieve the localized message describing the problem messageKey, String... The list of arguments that can be used to format the localized
description of the problem messageArguments)Adds a new validation problem that was found in the given |
| protected void | addProblem(Expression
The expression, int Expression that is either not following the BNF grammar or that
has semantic problemsThe position where the problem was encountered startPosition, String The key used to retrieve the localized message describing the problem messageKey, String... The list of arguments that can be used to format the localized
description of the problem messageArguments)Adds a new validation problem that was found in the given |
| protected void | addProblem(Expression
The expression, String Expression that is either not following the BNF grammar or that
has semantic problemsThe key used to retrieve the localized message describing the problem messageKey)Adds a new validation problem that was found in the given |
| protected void | addProblem(Expression
The expression, String Expression that is either not following the BNF grammar or that
has semantic problemsThe key used to retrieve the localized message describing the problem messageKey, String... The list of arguments that can be used to format the localized description of
the problem arguments)Adds a new validation problem that was found in the given |
| protected AbstractValidator. | |
| protected abstract LiteralVisitor | Returns: A newLiteralVisitorCreates the visitor that can retrieve some information about various literal. |
| protected AbstractValidator. | Returns: A newNestedArrayVisitorCreates the visitor that traverses an |
| protected abstract AbstractValidator. | Returns: A newOwningClauseVisitorCreates the visitor that traverses the parent hierarchy of any |
| protected AbstractValidator. | Returns: A newOwningStatementVisitorCreates the visitor that traverses the parent hierarchy of any |
| protected JPQLQueryProblem | Returns: TheJPQLQueryProblem describing a problemThe expression, int Expression that is either not following the BNF grammar or that
has semantic problemsThe position where the problem was encountered startPosition, int The position where the problem ends, inclusively endPosition, String The key used to retrieve the localized message describing the problem messageKey, String... The list of arguments that can be used to format the localized
description of the problem messageArguments)Creates a new validation problem that was found in the given |
| protected AbstractValidator. | Returns: A newSubqueryVisitorCreates the visitor that checks if the visited expression is a subquery or not.. |
| public void | |
| protected AbstractValidator. | |
| protected AbstractValidator. | |
| protected List | getChildren(Expression
The expression)Expression to visitReturns a list containing either the given |
| protected AbstractValidator. | |
| protected ExpressionRegistry | Returns: The registry containing the information related to the JPQL grammarReturns the registry containing the |
| protected AbstractValidator. | |
| protected abstract JPQLGrammar | Returns: TheJPQLGrammar that was used to parse the JPQL queryReturns the |
| protected JPAVersion | Returns: The version of the Java Persistence being usedReturns the version of the Java Persistence this entity for which it was defined. |
| protected AbstractValidator. | getJPQLQueryBNFValidator(JPQLQueryBNF
The BNF used to determine the validity of an queryBNF)ExpressionReturns the |
| protected AbstractValidator. | getJPQLQueryBNFValidator(String
The BNF used to determine the validity of an queryBNF)ExpressionReturns the |
| protected LiteralVisitor | Returns: ALiteralVisitorReturns the visitor that can retrieve some information about various literal. |
| protected AbstractValidator. | Returns: ANestedArrayVisitorReturns the visitor that can determine if an |
| protected AbstractValidator. | Returns: OwningClauseVisitorReturns the visitor that traverses the parent hierarchy of any |
| protected AbstractValidator. | Returns: OwningStatementVisitorReturns the visitor that traverses the parent hierarchy of any |
| protected String | Returns: The name of the persistence provider,null should never be returnedReturns the persistence provider name. |
| protected String | Returns: The version of the persistence provider, if one is extending the default JPQL grammar defined in the Java Persistence specification, otherwise returns an empty stringReturns the version of the persistence provider. |
| protected JPQLQueryBNF | Returns: TheJPQLQueryBNF representing a section of the grammarThe unique identifier of the queryBNFId)JPQLQueryBNF to retrieveRetrieves the BNF object that was registered for the given unique identifier. |
| protected AbstractValidator. | Returns: SubqueryVisitorReturns the visitor that checks if the visited expression is a subquery or not. |
| protected void | |
| protected boolean | isNestedArray(Expression
The expression)Expression to check its sizeDetermines whether the given |
| protected boolean | isSubquery(Expression
The expression)Expression to check its typeDetermines whether the given |
| protected boolean | Returns: true if the Expression's JPQLQueryBNF is either the
JPQLQueryBNF or a child of it; false otherwiseThe expression, JPQLQueryBNF Expression to validate based on the query BNFThe queryBNF)JPQLQueryBNF that determines if the given Expression is validDetermines whether the given |
| protected boolean | Returns: true if the Expression's JPQLQueryBNF is either the
JPQLQueryBNF or a child of it; false otherwiseThe expression, String Expression to validate based on the query BNFThe unique identifier of the queryBNFId)JPQLQueryBNF that determines if the
given Expression is validDetermines whether the given |
| protected boolean | Returns: true if the Expression's JPQLQueryBNF is either the
JPQLQueryBNF or a child of it; false otherwiseThe expression, String... Expression to validate based on the query BNFThe unique identifier of the queryBNFIds)JPQLQueryBNF that determines if the
given Expression is validDetermines whether the given |
| protected boolean | isValidWithChildCollectionBypass(Expression
The expression, String Expression to validate based on the query BNFThe unique identifier of the queryBNF)JPQLQueryBNF that looks up
the JPQLQueryBNFValidatorDetermines whether the given |
| protected boolean | Returns: true if the given Expression is part of a subquery; false
if it's part of the top-level queryThe expression)Expression to start scanning its locationDetermines whether the given |
| protected boolean | Returns: true if the given Expression is part of the top-level query;
false if it's part of a subqueryThe expression)Expression to start scanning its locationDetermines whether the given |
| protected int | Returns: The length of the string representation of the givenExpressionThe expression)Expression to retrieve the length of its stringReturns the length of the string representation of the given |
| protected String | Returns: A value from the givenExpression or an empty string if the given Expression and the LiteralType do not matchThe expression, LiteralType Expression to visitThe type)LiteralType helps to determine what to retrieve from the visited
ExpressionRetrieves the "literal" from the given |
| protected int | Returns: The number of items in the array or -1 if theExpression is not a nested arrayThe expression)Expression to visitReturns the number of items in the nested array if the given |
| protected int | Returns: The length of the string representation of what comes before the given expressionThe expression to determine its position within the parsed tree expression)Calculates the position of the given expression by calculating the length of what is before. |
| public final int | Returns: The current number of problemsReturns the current number of problems that were registered during validation. |
| public void | setProblems(Collection<JPQLQueryProblem>
A non- problems)null collection that will be used to store the problems if any was foundSets the collection that will be used to store |
| protected void | visit(Expression
The expression)Expression to visitOverrides org. Expression.
|