Package org.eclipse.persistence.jpa.jpql
Class AbstractSemanticValidator
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
-
- org.eclipse.persistence.jpa.jpql.AbstractValidator
-
- org.eclipse.persistence.jpa.jpql.AbstractSemanticValidator
-
- All Implemented Interfaces:
ExpressionVisitor
- Direct Known Subclasses:
AbstractEclipseLinkSemanticValidator
,DefaultSemanticValidator
public abstract class AbstractSemanticValidator extends AbstractValidator
The base validator responsible to gather the problems found in a JPQL query by validating the content to make sure it is semantically valid, i.e. based on the information contained in the JPA application. The grammar is not validated by this visitor.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.
- Version:
- 2.5.1
- See Also:
AbstractGrammarValidator
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractSemanticValidator.CollectionValuedPathExpressionVisitor
This visitor is meant to retrieve anCollectionValuedPathExpression
if the visitedExpression
is that object.protected static class
AbstractSemanticValidator.ComparingEntityTypeLiteralVisitor
protected static class
AbstractSemanticValidator.ComparisonExpressionVisitor
This visitor compares the left and right expressions of a comparison expression and gathers information about those expressions if they are an identification variable or a path expression.protected static class
AbstractSemanticValidator.FirstDeclarationVisitor
protected static class
AbstractSemanticValidator.InItemsVisitor
protected static class
AbstractSemanticValidator.PathType
This enumeration allowsvalidateStateFieldPathExpression( StateFieldPathExpression, PathType)
to validate the type of the mapping and to make sure it is allowed based on its location.protected static class
AbstractSemanticValidator.StateFieldPathExpressionVisitor
This visitor is meant to retrieve anAbstractSemanticValidator.StateFieldPathExpressionVisitor
if the visitedExpression
is that object.protected static class
AbstractSemanticValidator.SubqueryFirstDeclarationVisitor
protected static class
AbstractSemanticValidator.TopLevelFirstDeclarationVisitor
-
Nested classes/interfaces inherited from class org.eclipse.persistence.jpa.jpql.AbstractValidator
AbstractValidator.BypassChildCollectionExpressionVisitor, AbstractValidator.BypassParentSubExpressionVisitor, AbstractValidator.ChildrenCollectorVisitor, AbstractValidator.JPQLQueryBNFValidator, AbstractValidator.NestedArrayVisitor, AbstractValidator.OwningClauseVisitor, AbstractValidator.OwningStatementVisitor, AbstractValidator.SubqueryVisitor
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractSemanticValidator.CollectionValuedPathExpressionVisitor
collectionValuedPathExpressionVisitor
This visitor is responsible to retrieve the visitedExpression
if it is aCollectionValuedPathExpression
.protected SemanticValidatorHelper
helper
The given helper allows this validator to access the JPA artifacts without using Hermes SPI.protected boolean
registerIdentificationVariable
This flag is used to register theIdentificationVariables
that are used throughout the query (top-level query and subqueries), except the identification variables defining an abstract schema name or a collection-valued path expression.protected AbstractSemanticValidator.StateFieldPathExpressionVisitor
stateFieldPathExpressionVisitor
This visitor is responsible to retrieve the visitedExpression
if it is aStateFieldPathExpression
.protected java.util.List<IdentificationVariable>
usedIdentificationVariables
TheIdentificationVariables
that are used throughout the query (top-level query and subqueries), except the identification variables defining an abstract schema name or a collection-valued path expression.protected BaseDeclarationIdentificationVariableFinder
virtualIdentificationVariableFinder
This finder is responsible to retrieve the virtual identification variable from the UPDATE range declaration since it is optional.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSemanticValidator(SemanticValidatorHelper helper)
Creates a newAbstractSemanticValidator
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected AbstractSemanticValidator.ComparingEntityTypeLiteralVisitor
buildComparingEntityTypeLiteralVisitor()
protected AbstractSemanticValidator.InItemsVisitor
buildInItemsVisitor()
protected AbstractSemanticValidator.SubqueryFirstDeclarationVisitor
buildSubqueryFirstDeclarationVisitor()
protected AbstractSemanticValidator.TopLevelFirstDeclarationVisitor
buildTopLevelFirstDeclarationVisitor()
void
dispose()
Disposes this visitor.protected IdentificationVariable
findVirtualIdentificationVariable(AbstractSchemaName expression)
Returns theIdentificationVariable
that defines the identification variable for either aDELETE
or anUPDATE
query.protected CollectionValuedPathExpression
getCollectionValuedPathExpression(Expression expression)
protected AbstractSemanticValidator.CollectionValuedPathExpressionVisitor
getCollectionValuedPathExpressionVisitor()
protected AbstractSemanticValidator.ComparingEntityTypeLiteralVisitor
getComparingEntityTypeLiteralVisitor()
protected AbstractSemanticValidator.ComparisonExpressionVisitor
getComparisonExpressionVisitor()
protected JPQLGrammar
getGrammar()
Returns theJPQLGrammar
that defines how the JPQL query was parsed.protected AbstractSemanticValidator.InItemsVisitor
getInItemsVisitor()
protected StateFieldPathExpression
getStateFieldPathExpression(Expression expression)
protected AbstractSemanticValidator.StateFieldPathExpressionVisitor
getStateFieldPathExpressionVisitor()
protected BaseDeclarationIdentificationVariableFinder
getVirtualIdentificationVariableFinder()
Returns the visitor that can find theIdentificationVariable
of theRangeVariableDeclaration
.protected void
initialize()
Initializes this validator.protected boolean
isComparingEntityTypeLiteral(IdentificationVariable expression)
Determines whether the given identification variable is used in a comparison expression: "expression = LargeProject".protected boolean
isIdentificationVariableDeclaredAfter(java.lang.String variableName, int variableNameIndex, int joinIndex, java.util.List<JPQLQueryDeclaration> declarations)
protected boolean
isIdentificationVariableValidInComparison(IdentificationVariable expression)
Determines whether an identification variable can be used in a comparison expression when the operator is either '<', '<=', '>', '>='.protected boolean
isOrderComparison(ComparisonExpression expression)
Determines whether the givenComparisonExpression
compares two expression using one of the following operators: '<', '<=', '>', '>='.protected boolean
isValid(int result, int index)
Determines whether the expression at the given index is valid or not.protected abstract AbstractSemanticValidator.PathType
selectClausePathExpressionPathType()
Returns the type of path expression that is allowed in theSELECT
clause.protected AbstractSemanticValidator.FirstDeclarationVisitor
subqueryFirstDeclarationVisitor()
protected AbstractSemanticValidator.FirstDeclarationVisitor
topLevelFirstDeclarationVisitor()
protected int
updateStatus(int result, int index, boolean valid)
Updates the validation status of an expression at a specified position.protected boolean
validateAbsExpression(AbsExpression expression)
Validates the encapsulated expression of the givenABS
expression.protected void
validateAbstractFromClause(AbstractFromClause expression, AbstractSemanticValidator.FirstDeclarationVisitor visitor)
Validates the givenFROM
clause.protected boolean
validateAbstractSchemaName(AbstractSchemaName expression)
Validates the givenAbstractSchemaName
.protected int
validateAdditionExpression(AdditionExpression expression)
Validates the encapsulated expression of the given addition expression.protected void
validateAllOrAnyExpression(AllOrAnyExpression expression)
Validates the givenAllOrAnyExpression
.protected void
validateAndExpression(AndExpression expression)
Validates the givenAndExpression
.protected int
validateArithmeticExpression(ArithmeticExpression expression, java.lang.String leftExpressionWrongTypeMessageKey, java.lang.String rightExpressionWrongTypeMessageKey)
Validates the type of the left and right expressions defined by the givenArithmeticExpression
.protected boolean
validateArithmeticExpression(ArithmeticFactor expression)
Validates the arithmetic factor expression.protected boolean
validateAvgFunction(AvgFunction expression)
Validates the encapsulated expression of the givenAVG
expression.protected int
validateBetweenExpression(BetweenExpression expression)
Validates the givenBetweenExpression
.protected void
validateCaseExpression(CaseExpression expression)
Validates the givenCaseExpression
.protected void
validateCoalesceExpression(CoalesceExpression expression)
Validates the givenCoalesceExpression
.protected void
validateCollectionMemberDeclaration(CollectionMemberDeclaration expression)
Validates the givenCollectionMemberDeclaration
.protected int
validateCollectionMemberExpression(CollectionMemberExpression expression)
Validates the givenCollectionMemberExpression
.protected boolean
validateCollectionValuedPathExpression(Expression expression, boolean collectionTypeOnly)
Validates the givenExpression
and makes sure it's a valid collection value path expression.protected boolean
validateComparisonExpression(ComparisonExpression expression)
Validates the left and right expressions of the givenComparisonExpression
.protected boolean
validateConcatExpression(ConcatExpression expression)
Validates the encapsulated expression of the givenCONCAT
expression.protected void
validateConstructorExpression(ConstructorExpression expression)
Validates the givenConstructorExpression
.protected void
validateCountFunction(CountFunction expression)
Validates the givenCountFunction
.protected void
validateDateTime(DateTime expression)
Validates the givenDateTime
.protected void
validateDeleteClause(DeleteClause expression)
Validates the givenDeleteClause
.protected void
validateDeleteStatement(DeleteStatement expression)
Validates the givenDeleteStatement
.protected int
validateDivisionExpression(DivisionExpression expression)
Validates the encapsulated expression of the given division expression.protected boolean
validateEntityTypeLiteral(EntityTypeLiteral expression)
protected void
validateEntryExpression(EntryExpression expression)
Validates the givenEntryExpression
.protected void
validateExistsExpression(ExistsExpression expression)
Validates the givenExistsExpression
.protected void
validateFirstDeclaration(AbstractFromClause expression, JPQLQueryDeclaration declaration, AbstractSemanticValidator.FirstDeclarationVisitor visitor)
protected void
validateFromClause(FromClause expression)
Validates the givenFromClause
.protected void
validateFunctionExpression(FunctionExpression expression)
Validates the givenFunctionExpression
.protected boolean
validateFunctionPathExpression(AbstractSingleEncapsulatedExpression expression)
Validates the givenAbstractSingleEncapsulatedExpression
's encapsulated expression if it is a state field path expression and makes sure it is mapping to a basic mapping.protected int
validateFunctionPathExpression(CompoundExpression expression, AbstractSemanticValidator.PathType pathType)
Validates the left and right expressions of the given compound expression.protected void
validateGroupByClause(GroupByClause expression)
Validates the givenGroupByClause
.protected void
validateHavingClause(HavingClause expression)
Validates the givenHavingClause
.protected boolean
validateIdentificationVariable(IdentificationVariable expression)
Validates the givenIdentificationVariable
.protected boolean
validateIdentificationVariable(IdentificationVariable expression, java.lang.String variable)
Validates the given identification variable.protected void
validateIdentificationVariableDeclaration(IdentificationVariableDeclaration expression)
Validates the givenInExpression
.protected void
validateIdentificationVariables()
Validates the identification variables: Assures those used throughout the query have been defined in theFROM
clause in the current subquery or in a superquery. They have been defined only once.protected boolean
validateIndexExpression(IndexExpression expression)
Validates the givenIndexExpression
.protected void
validateInExpression(InExpression expression)
Validates the givenInExpression
.protected void
validateJoin(Join expression)
Validates the givenJoin
.protected boolean
validateJoinCollectionValuedPathExpression(Expression expression, boolean collectionTypeOnly)
Validates the givenExpression
and makes sure it's a valid collection value path expression.protected void
validateJoinsIdentificationVariable(AbstractFromClause expression, java.util.List<JPQLQueryDeclaration> declarations, JPQLQueryDeclaration declaration, int index)
protected void
validateKeyExpression(KeyExpression expression)
Validates the givenKeyExpression
.protected boolean
validateLengthExpression(LengthExpression expression)
Validates the encapsulated expression of the givenLENGTH
expression.protected int
validateLikeExpression(LikeExpression expression)
Validates the string expression of the givenLIKE
expression.protected int
validateLocateExpression(LocateExpression expression)
Validates the encapsulated expression of the givenLOCATE
expression.protected boolean
validateLowerExpression(LowerExpression expression)
Validates the encapsulated expression of the givenLOWER
expression.protected boolean
validateMaxFunction(MaxFunction expression)
Validates the encapsulated expression of the givenMAX
expression.protected boolean
validateMinFunction(MinFunction expression)
Validates the encapsulated expression of the givenMIN
expression.protected int
validateModExpression(ModExpression expression)
Validates the encapsulated expression of the givenMOD
expression.protected int
validateMultiplicationExpression(MultiplicationExpression expression)
Validates the encapsulated expression of the given multiplication expression.protected void
validateNotExpression(NotExpression expression)
Validates the givenNotExpression
.protected void
validateNullComparisonExpression(NullComparisonExpression expression)
Validates the givenNullComparisonExpression
.protected void
validateNullIfExpression(NullIfExpression expression)
Validates the givenNullIfExpression
.protected void
validateObjectExpression(ObjectExpression expression)
Validates the givenObjectExpression
.protected void
validateOnClause(OnClause expression)
Validates the givenOnClause
.protected void
validateOrderByClause(OrderByClause expression)
Validates the givenOrderByItem
.protected void
validateOrderByItem(OrderByItem expression)
Validates the givenOrderByItem
.protected void
validateOrExpression(OrExpression expression)
Validates the givenOrExpression
.protected void
validateRangeVariableDeclaration(RangeVariableDeclaration expression)
Validates the givenRangeVariableDeclaration
.protected void
validateRangeVariableDeclarationRootObject(RangeVariableDeclaration expression)
Validates the "root" object of the givenRangeVariableDeclaration
.protected void
validateResultVariable(ResultVariable expression)
Validates the givenResultVariable
.protected void
validateSelectClause(SelectClause expression)
Validates the givenSelectClause
.protected void
validateSelectStatement(SelectStatement expression)
Validates the givenSelectStatement
.protected void
validateSimpleFromClause(SimpleFromClause expression)
Validates the givenSimpleFromClause
.protected void
validateSimpleSelectClause(SimpleSelectClause expression)
Validates the givenSimpleSelectClause
.protected void
validateSimpleSelectStatement(SimpleSelectStatement expression)
protected boolean
validateSizeExpression(SizeExpression expression)
Validates the givenSizeExpression
.protected boolean
validateSqrtExpression(SqrtExpression expression)
Validates the encapsulated expression of the givenSQRT
expression.protected boolean
validateStateFieldPathExpression(StateFieldPathExpression expression, AbstractSemanticValidator.PathType pathType)
Validates the givenStateFieldPathExpression
.protected int
validateSubstringExpression(SubstringExpression expression)
Validates the encapsulated expression of the givenSUBSTRING
expression.protected int
validateSubtractionExpression(SubtractionExpression expression)
Validates the encapsulated expression of the given subtraction expression.protected boolean
validateSumFunction(SumFunction expression)
Validates the encapsulated expression of the givenMOD
expression.protected java.lang.Boolean
validateThirdPartyStateFieldPathExpression(StateFieldPathExpression expression)
Validates the givenStateFieldPathExpression
, which means the path does not represent a mapping, or an enum constant.protected void
validateTreatExpression(TreatExpression expression)
Validates the givenTreatExpression
.protected boolean
validateTrimExpression(TrimExpression expression)
Validates the encapsulated expression of the givenTRIM
expression.protected boolean
validateTypeExpression(TypeExpression expression)
Validates the givenTypeExpression
.protected void
validateUpdateClause(UpdateClause expression)
Validates the givenUpdateClause
.protected boolean
validateUpdateItem(UpdateItem expression)
Validates the givenUpdateItem
by validating the traversability of the path expression.protected void
validateUpdateStatement(UpdateStatement expression)
Validates the givenUpdateStatement
.protected boolean
validateUpperExpression(UpperExpression expression)
Validates the encapsulated expression of the givenUPPER
expression.protected void
validateValueExpression(ValueExpression expression)
Validates the givenValueExpression
.protected void
validateWhenClause(WhenClause expression)
Validates the givenWhenClause
.protected void
validateWhereClause(WhereClause expression)
Validates the givenWhereClause
.protected AbstractSemanticValidator.PathType
validPathExpressionTypeForCountFunction()
Returns the type of path expression that is valid for a count function; which is the left expression in aCOUNT
expression.protected AbstractSemanticValidator.PathType
validPathExpressionTypeForInExpression()
Returns the type of path expression that is valid for the expression being tested by anIN
expression; which is the left expression.protected AbstractSemanticValidator.PathType
validPathExpressionTypeForInItem()
Returns the type of path expression that is valid for anIN
items; which is the left expression in aIN
expression.protected AbstractSemanticValidator.PathType
validPathExpressionTypeForStringExpression()
Returns the type of path expression that is valid for a string expression; which is the left expression in aLIKE
expression.void
visit(AbsExpression expression)
Visits theAbsExpression
expression.void
visit(AbstractSchemaName expression)
Visits theAbstractSchemaName
expression.void
visit(AdditionExpression expression)
Visits theAdditionExpression
expression.void
visit(AllOrAnyExpression expression)
Visits theAllOrAnyExpression
expression.void
visit(AndExpression expression)
Visits theAndExpression
expression.void
visit(ArithmeticFactor expression)
Visits theArithmeticFactor
expression.void
visit(AvgFunction expression)
Visits theAvgFunction
expression.void
visit(BadExpression expression)
Visits theBadExpression
expression.void
visit(BetweenExpression expression)
Visits theBetweenExpression
expression.void
visit(CaseExpression expression)
Visits theCaseExpression
expression.void
visit(CoalesceExpression expression)
Visits theCoalesceExpression
expression.void
visit(CollectionExpression expression)
Visits theCollectionExpression
expression.void
visit(CollectionMemberDeclaration expression)
Visits theCollectionMemberDeclaration
expression.void
visit(CollectionMemberExpression expression)
Visits theCollectionMemberExpression
expression.void
visit(CollectionValuedPathExpression expression)
Visits theCollectionValuedPathExpression
expression.void
visit(ComparisonExpression expression)
Visits theComparisonExpression
expression.void
visit(ConcatExpression expression)
Visits theConcatExpression
expression.void
visit(ConstructorExpression expression)
Visits theConstructorExpression
expression.void
visit(CountFunction expression)
Visits theCountFunction
expression.void
visit(DateTime expression)
Visits theDateTime
expression.void
visit(DeleteClause expression)
Visits theDeleteClause
expression.void
visit(DeleteStatement expression)
Visits theDeleteStatement
expression.void
visit(DivisionExpression expression)
Visits theDivisionExpression
expression.void
visit(EmptyCollectionComparisonExpression expression)
Visits theEmptyCollectionComparisonExpression
expression.void
visit(EntityTypeLiteral expression)
Visits theEntityTypeLiteral
expression.void
visit(EntryExpression expression)
Visits theEntryExpression
expression.void
visit(ExistsExpression expression)
Visits theExistsExpression
expression.void
visit(FromClause expression)
Visits theFromClause
expression.void
visit(FunctionExpression expression)
Visits theFunctionExpression
expression.void
visit(GroupByClause expression)
Visits theGroupByClause
expression.void
visit(HavingClause expression)
Visits theHavingClause
expression.void
visit(IdentificationVariable expression)
Visits theIdentificationVariable
expression.void
visit(IdentificationVariableDeclaration expression)
Visits theIdentificationVariableDeclaration
expression.void
visit(IndexExpression expression)
Visits theIndexExpression
expression.void
visit(InExpression expression)
Visits theInExpression
expression.void
visit(InputParameter expression)
Visits theInputParameter
expression.void
visit(Join expression)
Visits theJoin
expression.void
visit(JPQLExpression expression)
Visits theJPQLExpression
expression.void
visit(KeyExpression expression)
Visits theKeyExpression
expression.void
visit(KeywordExpression expression)
Visits theKeywordExpression
expression.void
visit(LengthExpression expression)
Visits theLengthExpression
expression.void
visit(LikeExpression expression)
Visits theLikeExpression
expression.void
visit(LocateExpression expression)
Visits theLocateExpression
expression.void
visit(LowerExpression expression)
Visits theLowerExpression
expression.void
visit(MaxFunction expression)
Visits theMaxFunction
expression.void
visit(MinFunction expression)
Visits theMinFunction
expression.void
visit(ModExpression expression)
Visits theModExpression
expression.void
visit(MultiplicationExpression expression)
Visits theMultiplicationExpression
expression.void
visit(NotExpression expression)
Visits theNotExpression
expression.void
visit(NullComparisonExpression expression)
Visits theNullComparisonExpression
expression.void
visit(NullExpression expression)
Visits theNullExpression
expression.void
visit(NullIfExpression expression)
Visits theNullIfExpression
expression.void
visit(NumericLiteral expression)
Visits theNumericLiteral
expression.void
visit(ObjectExpression expression)
Visits theObjectExpression
expression.void
visit(OnClause expression)
Visits theOnClause
expression.void
visit(OrderByClause expression)
Visits theOrderByClause
expression.void
visit(OrderByItem expression)
Visits theOrderByItem
expression.void
visit(OrExpression expression)
Visits theOrExpression
expression.void
visit(RangeVariableDeclaration expression)
Visits theRangeVariableDeclaration
expression.void
visit(ResultVariable expression)
Visits theResultVariable
expression.void
visit(SelectClause expression)
Visits theSelectClause
expression.void
visit(SelectStatement expression)
Visits theSelectStatement
expression.void
visit(SimpleFromClause expression)
Visits theSimpleFromClause
expression.void
visit(SimpleSelectClause expression)
Visits theSimpleSelectClause
expression.void
visit(SimpleSelectStatement expression)
Visits theSimpleSelectStatement
expression.void
visit(SizeExpression expression)
Visits theSizeExpression
expression.void
visit(SqrtExpression expression)
Visits theSqrtExpression
expression.void
visit(StateFieldPathExpression expression)
Visits theStateFieldPathExpression
expression.void
visit(StringLiteral expression)
Visits theStringLiteral
expression.void
visit(SubExpression expression)
Visits theSubExpression
expression.void
visit(SubstringExpression expression)
Visits theSubstringExpression
expression.void
visit(SubtractionExpression expression)
Visits theSubtractionExpression
expression.void
visit(SumFunction expression)
Visits theSumFunction
expression.void
visit(TreatExpression expression)
Visits theTreatExpression
expression.void
visit(TrimExpression expression)
Visits theTrimExpression
expression.void
visit(TypeExpression expression)
Visits theTypeExpression
expression.void
visit(UnknownExpression expression)
Visits theUnknownExpression
expression.void
visit(UpdateClause expression)
Visits theUpdateClause
expression.void
visit(UpdateItem expression)
Visits theUpdateItem
expression.void
visit(UpdateStatement expression)
Visits theUpdateStatement
expression.void
visit(UpperExpression expression)
Visits theUpperExpression
expression.void
visit(ValueExpression expression)
Visits theValueExpression
expression.void
visit(WhenClause expression)
Visits theWhenClause
expression.void
visit(WhereClause expression)
Visits theWhereClause
expression.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.AbstractValidator
addProblem, addProblem, addProblem, addProblem, buildChildrenCollector, buildLiteralVisitor, buildNestedArrayVisitor, buildOwningClauseVisitor, buildOwningStatementVisitor, buildProblem, buildSubqueryVisitor, getBypassChildCollectionExpressionVisitor, getBypassParentSubExpressionVisitor, getChildren, getChildrenCollectorVisitor, getExpressionRegistry, getExpressionValidator, getJPAVersion, getJPQLQueryBNFValidator, getJPQLQueryBNFValidator, getLiteralVisitor, getNestedArrayVisitor, getOwningClauseVisitor, getOwningStatementVisitor, getProvider, getProviderVersion, getQueryBNF, getSubqueryVisitor, isNestedArray, isSubquery, isValid, isValid, isValid, isValidWithChildCollectionBypass, isWithinSubquery, isWithinTopLevelQuery, length, literal, nestedArraySize, position, problemsSize, setProblems, visit
-
-
-
-
Field Detail
-
collectionValuedPathExpressionVisitor
protected AbstractSemanticValidator.CollectionValuedPathExpressionVisitor collectionValuedPathExpressionVisitor
This visitor is responsible to retrieve the visitedExpression
if it is aCollectionValuedPathExpression
.
-
helper
protected final SemanticValidatorHelper helper
The given helper allows this validator to access the JPA artifacts without using Hermes SPI.
-
registerIdentificationVariable
protected boolean registerIdentificationVariable
This flag is used to register theIdentificationVariables
that are used throughout the query (top-level query and subqueries), except the identification variables defining an abstract schema name or a collection-valued path expression.
-
stateFieldPathExpressionVisitor
protected AbstractSemanticValidator.StateFieldPathExpressionVisitor stateFieldPathExpressionVisitor
This visitor is responsible to retrieve the visitedExpression
if it is aStateFieldPathExpression
.
-
usedIdentificationVariables
protected java.util.List<IdentificationVariable> usedIdentificationVariables
TheIdentificationVariables
that are used throughout the query (top-level query and subqueries), except the identification variables defining an abstract schema name or a collection-valued path expression.
-
virtualIdentificationVariableFinder
protected BaseDeclarationIdentificationVariableFinder virtualIdentificationVariableFinder
This finder is responsible to retrieve the virtual identification variable from the UPDATE range declaration since it is optional.
-
-
Constructor Detail
-
AbstractSemanticValidator
protected AbstractSemanticValidator(SemanticValidatorHelper helper)
Creates a newAbstractSemanticValidator
.- Parameters:
helper
- The given helper allows this validator to access the JPA artifacts without using Hermes SPI- Throws:
java.lang.NullPointerException
- The givenSemanticValidatorHelper
cannot benull
-
-
Method Detail
-
buildComparingEntityTypeLiteralVisitor
protected AbstractSemanticValidator.ComparingEntityTypeLiteralVisitor buildComparingEntityTypeLiteralVisitor()
-
buildInItemsVisitor
protected AbstractSemanticValidator.InItemsVisitor buildInItemsVisitor()
-
buildSubqueryFirstDeclarationVisitor
protected AbstractSemanticValidator.SubqueryFirstDeclarationVisitor buildSubqueryFirstDeclarationVisitor()
-
buildTopLevelFirstDeclarationVisitor
protected AbstractSemanticValidator.TopLevelFirstDeclarationVisitor buildTopLevelFirstDeclarationVisitor()
-
dispose
public void dispose()
Disposes this visitor.- Overrides:
dispose
in classAbstractValidator
-
findVirtualIdentificationVariable
protected IdentificationVariable findVirtualIdentificationVariable(AbstractSchemaName expression)
Returns theIdentificationVariable
that defines the identification variable for either aDELETE
or anUPDATE
query.- Parameters:
expression
- TheAbstractSchemaName
that is being validated and that most likely representing an associated path expression and not an entity name- Returns:
- The
IdentificationVariable
defining either the identification variable or the virtual identification variable for theDELETE
or for theUPDATE
query
-
getCollectionValuedPathExpression
protected CollectionValuedPathExpression getCollectionValuedPathExpression(Expression expression)
-
getCollectionValuedPathExpressionVisitor
protected AbstractSemanticValidator.CollectionValuedPathExpressionVisitor getCollectionValuedPathExpressionVisitor()
-
getComparingEntityTypeLiteralVisitor
protected AbstractSemanticValidator.ComparingEntityTypeLiteralVisitor getComparingEntityTypeLiteralVisitor()
-
getComparisonExpressionVisitor
protected AbstractSemanticValidator.ComparisonExpressionVisitor getComparisonExpressionVisitor()
-
getGrammar
protected JPQLGrammar getGrammar()
Returns theJPQLGrammar
that defines how the JPQL query was parsed.- Specified by:
getGrammar
in classAbstractValidator
- Returns:
- The
JPQLGrammar
that was used to parse the JPQL query
-
getInItemsVisitor
protected AbstractSemanticValidator.InItemsVisitor getInItemsVisitor()
-
getStateFieldPathExpression
protected StateFieldPathExpression getStateFieldPathExpression(Expression expression)
-
getStateFieldPathExpressionVisitor
protected AbstractSemanticValidator.StateFieldPathExpressionVisitor getStateFieldPathExpressionVisitor()
-
getVirtualIdentificationVariableFinder
protected BaseDeclarationIdentificationVariableFinder getVirtualIdentificationVariableFinder()
Returns the visitor that can find theIdentificationVariable
of theRangeVariableDeclaration
. This should be used when the query is either aDELETE
orUPDATE
query.- Returns:
- The visitor that can traverse the query and returns the
IdentificationVariable
-
initialize
protected void initialize()
Initializes this validator.- Overrides:
initialize
in classAbstractValidator
-
isComparingEntityTypeLiteral
protected boolean isComparingEntityTypeLiteral(IdentificationVariable expression)
Determines whether the given identification variable is used in a comparison expression: "expression = LargeProject".- Parameters:
expression
- TheIdentificationVariable
used to determine its purpose- Returns:
true
if the identification variable is used in a comparison expression;false
otherwise
-
isIdentificationVariableDeclaredAfter
protected boolean isIdentificationVariableDeclaredAfter(java.lang.String variableName, int variableNameIndex, int joinIndex, java.util.List<JPQLQueryDeclaration> declarations)
-
isIdentificationVariableValidInComparison
protected boolean isIdentificationVariableValidInComparison(IdentificationVariable expression)
Determines whether an identification variable can be used in a comparison expression when the operator is either '<', '<=', '>', '>='.- Parameters:
expression
- TheIdentificationVariable
that is mapped to either an entity, a singled-object value field, a collection-valued object field- Returns:
true
if it can be used in a ordering comparison expression;false
if it can't
-
isOrderComparison
protected boolean isOrderComparison(ComparisonExpression expression)
Determines whether the givenComparisonExpression
compares two expression using one of the following operators: '<', '<=', '>', '>='.- Parameters:
expression
- TheComparisonExpression
to check what type of operator that is used- Returns:
true
if the operator is used to check for order;false
if it is not
-
isValid
protected final boolean isValid(int result, int index)
Determines whether the expression at the given index is valid or not.- Parameters:
result
- The integer value containing the bit used to determine the state of an expression at a given positionindex
- The index that is used to determine the state of the expression- Returns:
true
if the expression is valid at the given index
-
selectClausePathExpressionPathType
protected abstract AbstractSemanticValidator.PathType selectClausePathExpressionPathType()
Returns the type of path expression that is allowed in theSELECT
clause.- Returns:
- The type of path expressions allowed. The spec defines it as basic or object mapping only, i.e. collection-valued path expression is not allowed
-
subqueryFirstDeclarationVisitor
protected AbstractSemanticValidator.FirstDeclarationVisitor subqueryFirstDeclarationVisitor()
-
topLevelFirstDeclarationVisitor
protected AbstractSemanticValidator.FirstDeclarationVisitor topLevelFirstDeclarationVisitor()
-
updateStatus
protected final int updateStatus(int result, int index, boolean valid)
Updates the validation status of an expression at a specified position. The value is stored in an integer value.- Parameters:
result
- The integer value that is used to store the validation status of an expression at the given positionindex
- The position to store the validation statusvalid
- The new validation status to store- Returns:
- The updated integer value
-
validateAbsExpression
protected boolean validateAbsExpression(AbsExpression expression)
Validates the encapsulated expression of the givenABS
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheAbsExpression
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateAbstractFromClause
protected void validateAbstractFromClause(AbstractFromClause expression, AbstractSemanticValidator.FirstDeclarationVisitor visitor)
Validates the givenFROM
clause. This will validate the order of identification variable declarations.- Parameters:
expression
- TheAbstractFromClause
to validatevisitor
-
-
validateAbstractSchemaName
protected boolean validateAbstractSchemaName(AbstractSchemaName expression)
Validates the givenAbstractSchemaName
. The tests to perform are:- Check to see the actual entity associated with the entity name does exist.
- If the abstract schema name is actually a path expression (which can be defined in a subquery but is always parsed as an abstract schema name), then make sure the path expression is resolving to a relationship mapping.
- Parameters:
expression
- TheAbstractSchemaName
to validate- Returns:
true
if the entity name was resolved;false
otherwise
-
validateAdditionExpression
protected int validateAdditionExpression(AdditionExpression expression)
Validates the encapsulated expression of the given addition expression. The test to perform is:- If the left or right expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the left or right expression is not a path expression, validation will be redirected to that expression but the returned status will not be updated.
- Parameters:
expression
- TheAdditionExpression
to validate by validating its encapsulated expression- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateAllOrAnyExpression
protected void validateAllOrAnyExpression(AllOrAnyExpression expression)
Validates the givenAllOrAnyExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheAllOrAnyExpression
to validate
-
validateAndExpression
protected void validateAndExpression(AndExpression expression)
Validates the givenAndExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheAndExpression
to validate
-
validateArithmeticExpression
protected int validateArithmeticExpression(ArithmeticExpression expression, java.lang.String leftExpressionWrongTypeMessageKey, java.lang.String rightExpressionWrongTypeMessageKey)
Validates the type of the left and right expressions defined by the givenArithmeticExpression
. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheArithmeticExpression
to validateleftExpressionWrongTypeMessageKey
- The key used to describe the left expression does not have a valid typerightExpressionWrongTypeMessageKey
- The key used to describe the right expression does not have a valid type- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateArithmeticExpression
protected boolean validateArithmeticExpression(ArithmeticFactor expression)
Validates the arithmetic factor expression. The test to perform is:- If the arithmetic factor is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- Parameters:
expression
- TheArithmeticFactor
to validate- Returns:
false
if the arithmetic factor expression was validated and is invalid;true
otherwise
-
validateAvgFunction
protected boolean validateAvgFunction(AvgFunction expression)
Validates the encapsulated expression of the givenAVG
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheAvgFunction
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateBetweenExpression
protected int validateBetweenExpression(BetweenExpression expression)
Validates the givenBetweenExpression
. The test to perform is:- If the "first" expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- Parameters:
expression
- TheBetweenExpression
to validate
-
validateCaseExpression
protected void validateCaseExpression(CaseExpression expression)
Validates the givenCaseExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheCaseExpression
to validate
-
validateCoalesceExpression
protected void validateCoalesceExpression(CoalesceExpression expression)
Validates the givenCoalesceExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheCoalesceExpression
to validate
-
validateCollectionMemberDeclaration
protected void validateCollectionMemberDeclaration(CollectionMemberDeclaration expression)
Validates the givenCollectionMemberDeclaration
.- Parameters:
expression
- TheCollectionMemberDeclaration
to validate
-
validateCollectionMemberExpression
protected int validateCollectionMemberExpression(CollectionMemberExpression expression)
Validates the givenCollectionMemberExpression
. Only the collection-valued path expression is validated.- Parameters:
expression
- TheCollectionMemberExpression
to validate- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateCollectionValuedPathExpression
protected boolean validateCollectionValuedPathExpression(Expression expression, boolean collectionTypeOnly)
Validates the givenExpression
and makes sure it's a valid collection value path expression.- Parameters:
expression
- TheExpression
to validatecollectionTypeOnly
-true
to make sure the path expression resolves to a collection mapping only;false
if it can simply resolves to a relationship mapping
-
validateJoinCollectionValuedPathExpression
protected boolean validateJoinCollectionValuedPathExpression(Expression expression, boolean collectionTypeOnly)
Validates the givenExpression
and makes sure it's a valid collection value path expression. join_collection_valued_path_expression::= identification_variable.{single_valued_embeddable_object_field.}*collection_valued_field join_single_valued_path_expression::= identification_variable.{single_valued_embeddable_object_field.}*single_valued_object_field- Parameters:
expression
- TheExpression
to validatecollectionTypeOnly
-true
to make sure the path expression resolves to a collection mapping only;false
if it can simply resolves to a relationship mapping
-
validateComparisonExpression
protected boolean validateComparisonExpression(ComparisonExpression expression)
Validates the left and right expressions of the givenComparisonExpression
. The tests to perform are:- If the comparison operator is either '=' or '<>'. The expressions can only be
- Two identification variables;
- Two path expressions resolving to an association field;
- One can be a path expression resolving to a basic field and the other one has to resolve to a basic value.
- If the comparison operator is either '<', '<=', '>=', '>'. The expressions cannot be
- Two identification variables;
- Two path expressions resolving to an association field;
- Parameters:
expression
- TheConcatExpression
to validate by validating its left and right expressions- Returns:
- The status of the comparison between the left and right expression:
true
if the two expressions pass the rules defined by this method;false
otherwise
- If the comparison operator is either '=' or '<>'. The expressions can only be
-
validateConcatExpression
protected boolean validateConcatExpression(ConcatExpression expression)
Validates the encapsulated expression of the givenCONCAT
expression. The tests to perform are:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheConcatExpression
to validate by validating its encapsulated expression- Returns:
false
if the first encapsulated expression was validated and is invalid;true
otherwise
-
validateConstructorExpression
protected void validateConstructorExpression(ConstructorExpression expression)
Validates the givenConstructorExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheConstructorExpression
to validate
-
validateCountFunction
protected void validateCountFunction(CountFunction expression)
Validates the givenCountFunction
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheCountFunction
to validate
-
validateDateTime
protected void validateDateTime(DateTime expression)
Validates the givenDateTime
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheDateTime
to validate
-
validateDeleteClause
protected void validateDeleteClause(DeleteClause expression)
Validates the givenDeleteClause
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheDeleteClause
to validate
-
validateDeleteStatement
protected void validateDeleteStatement(DeleteStatement expression)
Validates the givenDeleteStatement
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheDeleteStatement
to validate
-
validateDivisionExpression
protected int validateDivisionExpression(DivisionExpression expression)
Validates the encapsulated expression of the given division expression. The test to perform is:- If the left or right expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the left or right expression is not a path expression, validation will be redirected to that expression but the returned status will not be updated.
- Parameters:
expression
- TheDivisionExpression
to validate by validating its encapsulated expression- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateEntityTypeLiteral
protected boolean validateEntityTypeLiteral(EntityTypeLiteral expression)
-
validateEntryExpression
protected void validateEntryExpression(EntryExpression expression)
Validates the givenEntryExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheEntryExpression
to validate
-
validateExistsExpression
protected void validateExistsExpression(ExistsExpression expression)
Validates the givenExistsExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheExistsExpression
to validate
-
validateFirstDeclaration
protected void validateFirstDeclaration(AbstractFromClause expression, JPQLQueryDeclaration declaration, AbstractSemanticValidator.FirstDeclarationVisitor visitor)
-
validateFromClause
protected void validateFromClause(FromClause expression)
Validates the givenFromClause
.- Parameters:
expression
- TheFromClause
to validate
-
validateFunctionExpression
protected void validateFunctionExpression(FunctionExpression expression)
Validates the givenFunctionExpression
.- Parameters:
expression
- TheFunctionExpression
to validate
-
validateFunctionPathExpression
protected boolean validateFunctionPathExpression(AbstractSingleEncapsulatedExpression expression)
Validates the givenAbstractSingleEncapsulatedExpression
's encapsulated expression if it is a state field path expression and makes sure it is mapping to a basic mapping. That means relationship field mapping is not allowed.- Parameters:
expression
- TheAbstractSingleEncapsulatedExpression
to validate its encapsulated expression if it's a state field path expression, otherwise does nothing- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateFunctionPathExpression
protected int validateFunctionPathExpression(CompoundExpression expression, AbstractSemanticValidator.PathType pathType)
Validates the left and right expressions of the given compound expression. The test to perform is:- If the left or the right expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- Parameters:
expression
- TheCompoundExpression
to validate by validating its left and right expressionspathType
- The type of field that is allowed- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateGroupByClause
protected void validateGroupByClause(GroupByClause expression)
Validates the givenGroupByClause
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheGroupByClause
to validate
-
validateHavingClause
protected void validateHavingClause(HavingClause expression)
Validates the givenHavingClause
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheHavingClause
to validate
-
validateIdentificationVariable
protected boolean validateIdentificationVariable(IdentificationVariable expression)
Validates the givenIdentificationVariable
. The test to perform are:- If the identification variable resolves to an entity type literal, then no validation is performed.
- Parameters:
expression
- The identification variable to be validated- Returns:
true
if the given identification variable is valid;false
otherwise
-
validateIdentificationVariable
protected boolean validateIdentificationVariable(IdentificationVariable expression, java.lang.String variable)
Validates the given identification variable. The default behavior is to not validate it.- Parameters:
expression
- TheIdentificationVariable
that is being visitedvariable
- The actual identification variable, which is never an empty string- Returns:
true
if the given identification variable is valid;false
otherwise
-
validateIdentificationVariableDeclaration
protected void validateIdentificationVariableDeclaration(IdentificationVariableDeclaration expression)
Validates the givenInExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheInExpression
to validate
-
validateIdentificationVariables
protected void validateIdentificationVariables()
Validates the identification variables:- Assures those used throughout the query have been defined in the
FROM
clause in the current subquery or in a superquery. - They have been defined only once.
- Assures those used throughout the query have been defined in the
-
validateIndexExpression
protected boolean validateIndexExpression(IndexExpression expression)
Validates the givenIndexExpression
. It validates the identification variable and makes sure is it defined inIN
orIN
expression.- Parameters:
expression
- TheIndexExpression
to validate
-
validateInExpression
protected void validateInExpression(InExpression expression)
Validates the givenInExpression
. The test to perform is:- If the expression is a path expression, validation makes sure it is an association mapping, a basic field is not allowed.
- Parameters:
expression
- TheInExpression
to validate
-
validateJoin
protected void validateJoin(Join expression)
Validates the givenJoin
.- Parameters:
expression
- TheValueExpression
to validate
-
validateJoinsIdentificationVariable
protected void validateJoinsIdentificationVariable(AbstractFromClause expression, java.util.List<JPQLQueryDeclaration> declarations, JPQLQueryDeclaration declaration, int index)
-
validateKeyExpression
protected void validateKeyExpression(KeyExpression expression)
Validates the givenKeyExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheKeyExpression
to validate
-
validateLengthExpression
protected boolean validateLengthExpression(LengthExpression expression)
Validates the encapsulated expression of the givenLENGTH
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheLengthExpression
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateLikeExpression
protected int validateLikeExpression(LikeExpression expression)
Validates the string expression of the givenLIKE
expression. The test to perform is:- If the string expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheLengthExpression
to validate by validating its string expression- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateLocateExpression
protected int validateLocateExpression(LocateExpression expression)
Validates the encapsulated expression of the givenLOCATE
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheLocateExpression
to validate by validating its encapsulated expression- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateLowerExpression
protected boolean validateLowerExpression(LowerExpression expression)
Validates the encapsulated expression of the givenLOWER
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheLowerExpression
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateMaxFunction
protected boolean validateMaxFunction(MaxFunction expression)
Validates the encapsulated expression of the givenMAX
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheMaxFunction
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is not valid;true
otherwise
-
validateMinFunction
protected boolean validateMinFunction(MinFunction expression)
Validates the encapsulated expression of the givenMIN
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheMinFunction
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is not valid;true
otherwise
-
validateModExpression
protected int validateModExpression(ModExpression expression)
Validates the encapsulated expression of the givenMOD
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheModExpression
to validate by validating its encapsulated expression- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateMultiplicationExpression
protected int validateMultiplicationExpression(MultiplicationExpression expression)
Validates the encapsulated expression of the given multiplication expression. The test to perform is:- If the left or right expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the left or right expression is not a path expression, validation will be redirected to that expression but the returned status will not be updated.
- Parameters:
expression
- TheMultiplicationExpression
to validate by validating its encapsulated expression- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateNotExpression
protected void validateNotExpression(NotExpression expression)
Validates the givenNotExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheNotExpression
to validate
-
validateNullComparisonExpression
protected void validateNullComparisonExpression(NullComparisonExpression expression)
Validates the givenNullComparisonExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheNullComparisonExpression
to validate
-
validateNullIfExpression
protected void validateNullIfExpression(NullIfExpression expression)
Validates the givenNullIfExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheNullIfExpression
to validate
-
validateObjectExpression
protected void validateObjectExpression(ObjectExpression expression)
Validates the givenObjectExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheObjectExpression
to validate
-
validateOnClause
protected void validateOnClause(OnClause expression)
Validates the givenOnClause
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheOnClause
to validate
-
validateOrderByClause
protected void validateOrderByClause(OrderByClause expression)
Validates the givenOrderByItem
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheOrderByItem
to validate
-
validateOrderByItem
protected void validateOrderByItem(OrderByItem expression)
Validates the givenOrderByItem
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheOrderByItem
to validate
-
validateOrExpression
protected void validateOrExpression(OrExpression expression)
Validates the givenOrExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheOrExpression
to validate
-
validateRangeVariableDeclaration
protected void validateRangeVariableDeclaration(RangeVariableDeclaration expression)
Validates the givenRangeVariableDeclaration
.- Parameters:
expression
- TheRangeVariableDeclaration
to validate
-
validateRangeVariableDeclarationRootObject
protected void validateRangeVariableDeclarationRootObject(RangeVariableDeclaration expression)
Validates the "root" object of the givenRangeVariableDeclaration
.- Parameters:
expression
- TheRangeVariableDeclaration
that needs its "root" object to be validated
-
validateResultVariable
protected void validateResultVariable(ResultVariable expression)
Validates the givenResultVariable
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheResultVariable
to validate
-
validateSelectClause
protected void validateSelectClause(SelectClause expression)
Validates the givenSelectClause
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheSelectClause
to validate
-
validateSelectStatement
protected void validateSelectStatement(SelectStatement expression)
Validates the givenSelectStatement
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheSelectStatement
to validate
-
validateSimpleFromClause
protected void validateSimpleFromClause(SimpleFromClause expression)
Validates the givenSimpleFromClause
.- Parameters:
expression
- TheSimpleFromClause
to validate
-
validateSimpleSelectClause
protected void validateSimpleSelectClause(SimpleSelectClause expression)
Validates the givenSimpleSelectClause
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheSimpleSelectClause
to validate
-
validateSimpleSelectStatement
protected void validateSimpleSelectStatement(SimpleSelectStatement expression)
-
validateSizeExpression
protected boolean validateSizeExpression(SizeExpression expression)
Validates the givenSizeExpression
.- Parameters:
expression
- TheSizeExpression
to validate- Returns:
false
if the encapsulated expression is a collection-valued path expression and it was found to be invalid;true
otherwise
-
validateSqrtExpression
protected boolean validateSqrtExpression(SqrtExpression expression)
Validates the encapsulated expression of the givenSQRT
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheSqrtExpression
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateStateFieldPathExpression
protected boolean validateStateFieldPathExpression(StateFieldPathExpression expression, AbstractSemanticValidator.PathType pathType)
Validates the givenStateFieldPathExpression
.- Parameters:
expression
- TheStateFieldPathExpression
the validatepathType
- The type of field that is allowed- Returns:
true
if the givenStateFieldPathExpression
resolves to a valid path;false
otherwise
-
validateSubstringExpression
protected int validateSubstringExpression(SubstringExpression expression)
Validates the encapsulated expression of the givenSUBSTRING
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheSubstringExpression
to validate by validating its encapsulated expression- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateSubtractionExpression
protected int validateSubtractionExpression(SubtractionExpression expression)
Validates the encapsulated expression of the given subtraction expression. The test to perform is:- If the left or right expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the left or right expression is not a path expression, validation will be redirected to that expression but the returned status will not be updated.
- Parameters:
expression
- TheSubtractionExpression
to validate by validating its encapsulated expression- Returns:
- A number indicating the validation result.
isValid(int, int)
can be used to determine the validation status of an expression based on its position
-
validateSumFunction
protected boolean validateSumFunction(SumFunction expression)
Validates the encapsulated expression of the givenMOD
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheModExpression
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateThirdPartyStateFieldPathExpression
protected java.lang.Boolean validateThirdPartyStateFieldPathExpression(StateFieldPathExpression expression)
Validates the givenStateFieldPathExpression
, which means the path does not represent a mapping, or an enum constant.- Parameters:
expression
- TheStateFieldPathExpression
the validate- Returns:
Boolean.TRUE
orBoolean.FALSE
if the givenStateFieldPathExpression
was validated by this method;null
if it could not be validated (as being valid or invalid)
-
validateTreatExpression
protected void validateTreatExpression(TreatExpression expression)
Validates the givenTreatExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheTreatExpression
to validate
-
validateTrimExpression
protected boolean validateTrimExpression(TrimExpression expression)
Validates the encapsulated expression of the givenTRIM
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheTrimExpression
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateTypeExpression
protected boolean validateTypeExpression(TypeExpression expression)
Validates the givenTypeExpression
. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is an association field, a basic field is not allowed.
- Parameters:
expression
- TheTypeExpression
to validate- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateUpdateClause
protected void validateUpdateClause(UpdateClause expression)
Validates the givenUpdateClause
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheUpdateClause
to validate
-
validateUpdateItem
protected boolean validateUpdateItem(UpdateItem expression)
Validates the givenUpdateItem
by validating the traversability of the path expression. The path expression is valid if it follows one of the following rules:- The identification variable is omitted if it's not defined in the FROM clause;
- The last path is a state field;
- Only embedded field can be traversed.
- Parameters:
expression
-UpdateItem
to validate its path expression- Returns:
true
if the path expression is valid;false
otherwise
-
validateUpdateStatement
protected void validateUpdateStatement(UpdateStatement expression)
Validates the givenUpdateStatement
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheUpdateStatement
to validate
-
validateUpperExpression
protected boolean validateUpperExpression(UpperExpression expression)
Validates the encapsulated expression of the givenUPPER
expression. The test to perform is:- If the encapsulated expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.
- If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.
- Parameters:
expression
- TheUpperExpression
to validate by validating its encapsulated expression- Returns:
false
if the encapsulated expression was validated and is invalid;true
otherwise
-
validateValueExpression
protected void validateValueExpression(ValueExpression expression)
Validates the givenValueExpression
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheValueExpression
to validate
-
validateWhenClause
protected void validateWhenClause(WhenClause expression)
Validates the givenWhenClause
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheWhenClause
to validate
-
validateWhereClause
protected void validateWhereClause(WhereClause expression)
Validates the givenWhereClause
. The default behavior does not require to semantically validate it.- Parameters:
expression
- TheWhereClause
to validate
-
validPathExpressionTypeForCountFunction
protected AbstractSemanticValidator.PathType validPathExpressionTypeForCountFunction()
Returns the type of path expression that is valid for a count function; which is the left expression in aCOUNT
expression.- Returns:
- By default, any field are allowed except collection
-
validPathExpressionTypeForInExpression
protected AbstractSemanticValidator.PathType validPathExpressionTypeForInExpression()
Returns the type of path expression that is valid for the expression being tested by anIN
expression; which is the left expression.- Returns:
- By default, any field (without collection) is allowed
-
validPathExpressionTypeForInItem
protected AbstractSemanticValidator.PathType validPathExpressionTypeForInItem()
Returns the type of path expression that is valid for anIN
items; which is the left expression in aIN
expression.- Returns:
- By default, any field are allowed except collection
-
validPathExpressionTypeForStringExpression
protected AbstractSemanticValidator.PathType validPathExpressionTypeForStringExpression()
Returns the type of path expression that is valid for a string expression; which is the left expression in aLIKE
expression.- Returns:
- By default, only basic field are allowed
-
visit
public final void visit(AbsExpression expression)
Visits theAbsExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(AbstractSchemaName expression)
Visits theAbstractSchemaName
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(AdditionExpression expression)
Visits theAdditionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(AllOrAnyExpression expression)
Visits theAllOrAnyExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(AndExpression expression)
Visits theAndExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(ArithmeticFactor expression)
Visits theArithmeticFactor
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(AvgFunction expression)
Visits theAvgFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(BadExpression expression)
Visits theBadExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(BetweenExpression expression)
Visits theBetweenExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(CaseExpression expression)
Visits theCaseExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(CoalesceExpression expression)
Visits theCoalesceExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(CollectionExpression expression)
Visits theCollectionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(CollectionMemberDeclaration expression)
Visits theCollectionMemberDeclaration
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(CollectionMemberExpression expression)
Visits theCollectionMemberExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(CollectionValuedPathExpression expression)
Visits theCollectionValuedPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(ComparisonExpression expression)
Visits theComparisonExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(ConcatExpression expression)
Visits theConcatExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(ConstructorExpression expression)
Visits theConstructorExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(CountFunction expression)
Visits theCountFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(DateTime expression)
Visits theDateTime
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(DeleteClause expression)
Visits theDeleteClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(DeleteStatement expression)
Visits theDeleteStatement
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(DivisionExpression expression)
Visits theDivisionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(EmptyCollectionComparisonExpression expression)
Visits theEmptyCollectionComparisonExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(EntityTypeLiteral expression)
Visits theEntityTypeLiteral
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(EntryExpression expression)
Visits theEntryExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(ExistsExpression expression)
Visits theExistsExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(FromClause expression)
Visits theFromClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(FunctionExpression expression)
Visits theFunctionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(GroupByClause expression)
Visits theGroupByClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(HavingClause expression)
Visits theHavingClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(IdentificationVariable expression)
Visits theIdentificationVariable
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(IdentificationVariableDeclaration expression)
Visits theIdentificationVariableDeclaration
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(IndexExpression expression)
Visits theIndexExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(InExpression expression)
Visits theInExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(InputParameter expression)
Visits theInputParameter
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(Join expression)
Visits theJoin
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(JPQLExpression expression)
Visits theJPQLExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(KeyExpression expression)
Visits theKeyExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(KeywordExpression expression)
Visits theKeywordExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(LengthExpression expression)
Visits theLengthExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(LikeExpression expression)
Visits theLikeExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(LocateExpression expression)
Visits theLocateExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(LowerExpression expression)
Visits theLowerExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(MaxFunction expression)
Visits theMaxFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(MinFunction expression)
Visits theMinFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(ModExpression expression)
Visits theModExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(MultiplicationExpression expression)
Visits theMultiplicationExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(NotExpression expression)
Visits theNotExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(NullComparisonExpression expression)
Visits theNullComparisonExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(NullExpression expression)
Visits theNullExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(NullIfExpression expression)
Visits theNullIfExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(NumericLiteral expression)
Visits theNumericLiteral
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(ObjectExpression expression)
Visits theObjectExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(OnClause expression)
Visits theOnClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(OrderByClause expression)
Visits theOrderByClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(OrderByItem expression)
Visits theOrderByItem
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(OrExpression expression)
Visits theOrExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(RangeVariableDeclaration expression)
Visits theRangeVariableDeclaration
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(ResultVariable expression)
Visits theResultVariable
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SelectClause expression)
Visits theSelectClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SelectStatement expression)
Visits theSelectStatement
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SimpleFromClause expression)
Visits theSimpleFromClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SimpleSelectClause expression)
Visits theSimpleSelectClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SimpleSelectStatement expression)
Visits theSimpleSelectStatement
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SizeExpression expression)
Visits theSizeExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SqrtExpression expression)
Visits theSqrtExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(StateFieldPathExpression expression)
Visits theStateFieldPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(StringLiteral expression)
Visits theStringLiteral
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SubExpression expression)
Visits theSubExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SubstringExpression expression)
Visits theSubstringExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SubtractionExpression expression)
Visits theSubtractionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SumFunction expression)
Visits theSumFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(TreatExpression expression)
Visits theTreatExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(TrimExpression expression)
Visits theTrimExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(TypeExpression expression)
Visits theTypeExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(UnknownExpression expression)
Visits theUnknownExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheUnknownExpression
to visit
-
visit
public final void visit(UpdateClause expression)
Visits theUpdateClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheUpdateClause
to visit
-
visit
public final void visit(UpdateItem expression)
Visits theUpdateItem
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheUpdateItem
to visit
-
visit
public final void visit(UpdateStatement expression)
Visits theUpdateStatement
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheUpdateStatement
to visit
-
visit
public final void visit(UpperExpression expression)
Visits theUpperExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheUpperExpression
to visit
-
visit
public final void visit(ValueExpression expression)
Visits theValueExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheValueExpression
to visit
-
visit
public final void visit(WhenClause expression)
Visits theWhenClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheWhenClause
to visit
-
visit
public final void visit(WhereClause expression)
Visits theWhereClause
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheWhereClause
to visit
-
-