Package org.eclipse.persistence.jpa.jpql
Class AbstractValidator.JPQLQueryBNFValidator
java.lang.Object
org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
org.eclipse.persistence.jpa.jpql.AbstractValidator.JPQLQueryBNFValidator
- All Implemented Interfaces:
- ExpressionVisitor
- Enclosing class:
- AbstractValidator
This visitor validates any 
Expression by checking its BNF against some BNFs.- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanIndicates whether aJPQLQueryBNFrepresenting a compound expression should be considered when doing the validationprotected booleanDetermines whether the visitedExpression's BNF is valid based on the BNF that was used for validation.
- 
Constructor SummaryConstructorsConstructorDescriptionJPQLQueryBNFValidator(JPQLQueryBNF queryBNF) Creates a newJPQLQueryBNFValidator.
- 
Method SummaryModifier and TypeMethodDescriptionvoiddispose()Disposes of the internal data.booleanisValid()Determines whether the visitedExpressionis valid or not based on theJPQLQueryBNFthat was specified.voidsetBypassCompound(boolean bypassCompound) Sets bypassCompoundvoidvalidate(JPQLQueryBNF queryBNF) Validates the givenJPQLQueryBNFby making sure it is the one expected or one of the children from the "root" BNF passed to this validator's constructor.voidvisit(BadExpression expression) Visits theBadExpressionexpression.voidvisit(CollectionExpression expression) Visits theCollectionExpressionexpression.protected voidvisit(Expression expression) Blindly visit the givenExpression.voidvisit(NullExpression expression) Visits theNullExpressionexpression.voidvisit(SubExpression expression) Visits theSubExpressionexpression.voidvisit(UnknownExpression expression) Visits theUnknownExpressionexpression.Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitorvisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
- 
Field Details- 
bypassCompoundprotected boolean bypassCompoundIndicates whether aJPQLQueryBNFrepresenting a compound expression should be considered when doing the validation
- 
validprotected boolean validDetermines whether the visitedExpression's BNF is valid based on the BNF that was used for validation.
 
- 
- 
Constructor Details- 
JPQLQueryBNFValidatorCreates a newJPQLQueryBNFValidator.- Parameters:
- queryBNF- The- JPQLQueryBNFused to determine if the expression's BNF is valid
 
 
- 
- 
Method Details- 
disposepublic void dispose()Disposes of the internal data.
- 
isValidpublic boolean isValid()Determines whether the visitedExpressionis valid or not based on theJPQLQueryBNFthat was specified.- Returns:
- trueif the- Expressionis valid;- falseotherwise
 
- 
setBypassCompoundpublic void setBypassCompound(boolean bypassCompound) Sets bypassCompound- Parameters:
- bypassCompound- Indicates whether a- JPQLQueryBNFrepresenting a compound expression should be considered when doing the validation
 
- 
validateValidates the givenJPQLQueryBNFby making sure it is the one expected or one of the children from the "root" BNF passed to this validator's constructor.- Parameters:
- queryBNF- The- JPQLQueryBNFto validate
 
- 
visitDescription copied from interface:ExpressionVisitorVisits theBadExpressionexpression.- Specified by:
- visitin interface- ExpressionVisitor
- Overrides:
- visitin class- AnonymousExpressionVisitor
- Parameters:
- expression- The- Expressionto visit
 
- 
visitDescription copied from interface:ExpressionVisitorVisits theCollectionExpressionexpression.- Specified by:
- visitin interface- ExpressionVisitor
- Overrides:
- visitin class- AnonymousExpressionVisitor
- Parameters:
- expression- The- Expressionto visit
 
- 
visitDescription copied from class:AnonymousExpressionVisitorBlindly visit the givenExpression.- Overrides:
- visitin class- AnonymousExpressionVisitor
- Parameters:
- expression- The- Expressionto visit
 
- 
visitDescription copied from interface:ExpressionVisitorVisits theNullExpressionexpression.- Specified by:
- visitin interface- ExpressionVisitor
- Overrides:
- visitin class- AnonymousExpressionVisitor
- Parameters:
- expression- The- Expressionto visit
 
- 
visitDescription copied from interface:ExpressionVisitorVisits theSubExpressionexpression.- Specified by:
- visitin interface- ExpressionVisitor
- Overrides:
- visitin class- AnonymousExpressionVisitor
- Parameters:
- expression- The- Expressionto visit
 
- 
visitDescription copied from interface:ExpressionVisitorVisits theUnknownExpressionexpression.- Specified by:
- visitin interface- ExpressionVisitor
- Overrides:
- visitin class- AnonymousExpressionVisitor
- Parameters:
- expression- The- UnknownExpressionto visit
 
 
-