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
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.
- Since:
- 2.4
- Version:
- 2.5.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final classThis visitor is meant to retrieve anCollectionValuedPathExpressionif the visitedExpressionis that object.protected static final classprotected static final classThis 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 classprotected static final classprotected static enumThis enumeration allowsvalidateStateFieldPathExpression(StateFieldPathExpression, PathType)to validate the type of the mapping and to make sure it is allowed based on its location.protected static final classThis visitor is meant to retrieve anAbstractSemanticValidator.StateFieldPathExpressionVisitorif the visitedExpressionis that object.protected static final classprotected static classNested 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
FieldsModifier and TypeFieldDescriptionThis visitor is responsible to retrieve the visitedExpressionif it is aCollectionValuedPathExpression.protected final SemanticValidatorHelperThe given helper allows this validator to access the JPA artifacts without using Hermes SPI.protected booleanThis flag is used to register theIdentificationVariablesthat 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.This visitor is responsible to retrieve the visitedExpressionif it is aStateFieldPathExpression.protected List<IdentificationVariable> TheIdentificationVariablesthat 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.This finder is responsible to retrieve the virtual identification variable from the UPDATE range declaration since it is optional. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newAbstractSemanticValidator. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractSemanticValidator.InItemsVisitorvoiddispose()Disposes this visitor.protected IdentificationVariablefindVirtualIdentificationVariable(AbstractSchemaName expression) Returns theIdentificationVariablethat defines the identification variable for either aDELETEor anUPDATEquery.protected CollectionValuedPathExpressiongetCollectionValuedPathExpression(Expression expression) protected JPQLGrammarReturns theJPQLGrammarthat defines how the JPQL query was parsed.protected AbstractSemanticValidator.InItemsVisitorprotected StateFieldPathExpressiongetStateFieldPathExpression(Expression expression) Returns the visitor that can find theIdentificationVariableof theRangeVariableDeclaration.protected voidInitializes this validator.protected booleanisComparingEntityTypeLiteral(IdentificationVariable expression) Determines whether the given identification variable is used in a comparison expression: "expression = LargeProject".protected booleanisIdentificationVariableDeclaredAfter(String variableName, int variableNameIndex, int joinIndex, List<? extends JPQLQueryDeclaration> declarations) protected booleanDetermines whether an identification variable can be used in a comparison expression when the operator is either '<', '<=', '>', '>='.protected booleanisOrderComparison(ComparisonExpression expression) Determines whether the givenComparisonExpressioncompares two expression using one of the following operators: '<', '<=', '>', '>='.protected final booleanisValid(int result, int index) Determines whether the expression at the given index is valid or not.protected abstract AbstractSemanticValidator.PathTypeReturns the type of path expression that is allowed in theSELECTclause.protected final intupdateStatus(int result, int index, boolean valid) Updates the validation status of an expression at a specified position.protected booleanvalidateAbsExpression(AbsExpression expression) Validates the encapsulated expression of the givenABSexpression.protected voidvalidateAbstractFromClause(AbstractFromClause expression, AbstractSemanticValidator.FirstDeclarationVisitor visitor) Validates the givenFROMclause.protected booleanvalidateAbstractSchemaName(AbstractSchemaName expression) Validates the givenAbstractSchemaName.protected intvalidateAdditionExpression(AdditionExpression expression) Validates the encapsulated expression of the given addition expression.protected voidvalidateAllOrAnyExpression(AllOrAnyExpression expression) Validates the givenAllOrAnyExpression.protected voidvalidateAndExpression(AndExpression expression) Validates the givenAndExpression.protected intvalidateArithmeticExpression(ArithmeticExpression expression, String leftExpressionWrongTypeMessageKey, String rightExpressionWrongTypeMessageKey) Validates the type of the left and right expressions defined by the givenArithmeticExpression.protected booleanvalidateArithmeticExpression(ArithmeticFactor expression) Validates the arithmetic factor expression.protected booleanvalidateAvgFunction(AvgFunction expression) Validates the encapsulated expression of the givenAVGexpression.protected intvalidateBetweenExpression(BetweenExpression expression) Validates the givenBetweenExpression.protected voidvalidateCaseExpression(CaseExpression expression) Validates the givenCaseExpression.protected voidvalidateCoalesceExpression(CoalesceExpression expression) Validates the givenCoalesceExpression.protected voidValidates the givenCollectionMemberDeclaration.protected intValidates the givenCollectionMemberExpression.protected booleanvalidateCollectionValuedPathExpression(Expression expression, boolean collectionTypeOnly) Validates the givenExpressionand makes sure it's a valid collection value path expression.protected booleanvalidateComparisonExpression(ComparisonExpression expression) Validates the left and right expressions of the givenComparisonExpression.protected booleanvalidateConcatExpression(ConcatExpression expression) Validates the encapsulated expression of the givenCONCATexpression.protected voidvalidateConstructorExpression(ConstructorExpression expression) Validates the givenConstructorExpression.protected voidvalidateCountFunction(CountFunction expression) Validates the givenCountFunction.protected voidvalidateDateTime(DateTime expression) Validates the givenDateTime.protected voidvalidateDeleteClause(DeleteClause expression) Validates the givenDeleteClause.protected voidvalidateDeleteStatement(DeleteStatement expression) Validates the givenDeleteStatement.protected intvalidateDivisionExpression(DivisionExpression expression) Validates the encapsulated expression of the given division expression.protected booleanvalidateEntityTypeLiteral(EntityTypeLiteral expression) protected voidvalidateEntryExpression(EntryExpression expression) Validates the givenEntryExpression.protected voidvalidateExistsExpression(ExistsExpression expression) Validates the givenExistsExpression.protected voidvalidateFirstDeclaration(AbstractFromClause expression, JPQLQueryDeclaration declaration, AbstractSemanticValidator.FirstDeclarationVisitor visitor) protected voidvalidateFromClause(FromClause expression) Validates the givenFromClause.protected voidvalidateFunctionExpression(FunctionExpression expression) Validates the givenFunctionExpression.protected booleanValidates the givenAbstractSingleEncapsulatedExpression's encapsulated expression if it is a state field path expression and makes sure it is mapping to a basic mapping.protected intvalidateFunctionPathExpression(CompoundExpression expression, AbstractSemanticValidator.PathType pathType) Validates the left and right expressions of the given compound expression.protected voidvalidateGroupByClause(GroupByClause expression) Validates the givenGroupByClause.protected voidvalidateHavingClause(HavingClause expression) Validates the givenHavingClause.protected booleanvalidateIdentificationVariable(IdentificationVariable expression) Validates the givenIdentificationVariable.protected booleanvalidateIdentificationVariable(IdentificationVariable expression, String variable) Validates the given identification variable.protected voidValidates the givenInExpression.protected voidValidates the identification variables: Assures those used throughout the query have been defined in theFROMclause in the current subquery or in a superquery. They have been defined only once.protected booleanvalidateIndexExpression(IndexExpression expression) Validates the givenIndexExpression.protected voidvalidateInExpression(InExpression expression) Validates the givenInExpression.protected voidvalidateJoin(Join expression) Validates the givenJoin.protected booleanvalidateJoinCollectionValuedPathExpression(Expression expression, boolean collectionTypeOnly) Validates the givenExpressionand makes sure it's a valid collection value path expression.protected voidvalidateJoinsIdentificationVariable(AbstractFromClause expression, List<? extends JPQLQueryDeclaration> declarations, JPQLQueryDeclaration declaration, int index) protected voidvalidateKeyExpression(KeyExpression expression) Validates the givenKeyExpression.protected booleanvalidateLengthExpression(LengthExpression expression) Validates the encapsulated expression of the givenLENGTHexpression.protected intvalidateLikeExpression(LikeExpression expression) Validates the string expression of the givenLIKEexpression.protected intvalidateLocateExpression(LocateExpression expression) Validates the encapsulated expression of the givenLOCATEexpression.protected booleanvalidateLowerExpression(LowerExpression expression) Validates the encapsulated expression of the givenLOWERexpression.protected booleanvalidateMaxFunction(MaxFunction expression) Validates the encapsulated expression of the givenMAXexpression.protected booleanvalidateMinFunction(MinFunction expression) Validates the encapsulated expression of the givenMINexpression.protected intvalidateModExpression(ModExpression expression) Validates the encapsulated expression of the givenMODexpression.protected intValidates the encapsulated expression of the given multiplication expression.protected voidvalidateNotExpression(NotExpression expression) Validates the givenNotExpression.protected voidValidates the givenNullComparisonExpression.protected voidvalidateNullIfExpression(NullIfExpression expression) Validates the givenNullIfExpression.protected voidvalidateObjectExpression(ObjectExpression expression) Validates the givenObjectExpression.protected voidvalidateOnClause(OnClause expression) Validates the givenOnClause.protected voidvalidateOrderByClause(OrderByClause expression) Validates the givenOrderByItem.protected voidvalidateOrderByItem(OrderByItem expression) Validates the givenOrderByItem.protected voidvalidateOrExpression(OrExpression expression) Validates the givenOrExpression.protected voidValidates the givenRangeVariableDeclaration.protected voidValidates the "root" object of the givenRangeVariableDeclaration.protected voidvalidateResultVariable(ResultVariable expression) Validates the givenResultVariable.protected voidvalidateSelectClause(SelectClause expression) Validates the givenSelectClause.protected voidvalidateSelectStatement(SelectStatement expression) Validates the givenSelectStatement.protected voidvalidateSimpleFromClause(SimpleFromClause expression) Validates the givenSimpleFromClause.protected voidvalidateSimpleSelectClause(SimpleSelectClause expression) Validates the givenSimpleSelectClause.protected voidvalidateSimpleSelectStatement(SimpleSelectStatement expression) protected booleanvalidateSizeExpression(SizeExpression expression) Validates the givenSizeExpression.protected booleanvalidateSqrtExpression(SqrtExpression expression) Validates the encapsulated expression of the givenSQRTexpression.protected booleanvalidateStateFieldPathExpression(StateFieldPathExpression expression, AbstractSemanticValidator.PathType pathType) Validates the givenStateFieldPathExpression.protected intvalidateSubstringExpression(SubstringExpression expression) Validates the encapsulated expression of the givenSUBSTRINGexpression.protected intvalidateSubtractionExpression(SubtractionExpression expression) Validates the encapsulated expression of the given subtraction expression.protected booleanvalidateSumFunction(SumFunction expression) Validates the encapsulated expression of the givenMODexpression.protected BooleanValidates the givenStateFieldPathExpression, which means the path does not represent a mapping, or an enum constant.protected voidvalidateTreatExpression(TreatExpression expression) Validates the givenTreatExpression.protected booleanvalidateTrimExpression(TrimExpression expression) Validates the encapsulated expression of the givenTRIMexpression.protected booleanvalidateTypeExpression(TypeExpression expression) Validates the givenTypeExpression.protected voidvalidateUpdateClause(UpdateClause expression) Validates the givenUpdateClause.protected booleanvalidateUpdateItem(UpdateItem expression) Validates the givenUpdateItemby validating the traversability of the path expression.protected voidvalidateUpdateStatement(UpdateStatement expression) Validates the givenUpdateStatement.protected booleanvalidateUpperExpression(UpperExpression expression) Validates the encapsulated expression of the givenUPPERexpression.protected voidvalidateValueExpression(ValueExpression expression) Validates the givenValueExpression.protected voidvalidateWhenClause(WhenClause expression) Validates the givenWhenClause.protected voidvalidateWhereClause(WhereClause expression) Validates the givenWhereClause.protected AbstractSemanticValidator.PathTypeReturns the type of path expression that is valid for a count function; which is the left expression in aCOUNTexpression.protected AbstractSemanticValidator.PathTypeReturns the type of path expression that is valid for the expression being tested by anINexpression; which is the left expression.protected AbstractSemanticValidator.PathTypeReturns the type of path expression that is valid for anINitems; which is the left expression in aINexpression.protected AbstractSemanticValidator.PathTypeReturns the type of path expression that is valid for a string expression; which is the left expression in aLIKEexpression.final voidvisit(AbsExpression expression) Visits theAbsExpressionexpression.final voidvisit(AbstractSchemaName expression) Visits theAbstractSchemaNameexpression.final voidvisit(AdditionExpression expression) Visits theAdditionExpressionexpression.final voidvisit(AllOrAnyExpression expression) Visits theAllOrAnyExpressionexpression.final voidvisit(AndExpression expression) Visits theAndExpressionexpression.final voidvisit(ArithmeticFactor expression) Visits theArithmeticFactorexpression.final voidvisit(AvgFunction expression) Visits theAvgFunctionexpression.final voidvisit(BadExpression expression) Visits theBadExpressionexpression.final voidvisit(BetweenExpression expression) Visits theBetweenExpressionexpression.final voidvisit(CaseExpression expression) Visits theCaseExpressionexpression.final voidvisit(CoalesceExpression expression) Visits theCoalesceExpressionexpression.final voidvisit(CollectionExpression expression) Visits theCollectionExpressionexpression.final voidvisit(CollectionMemberDeclaration expression) Visits theCollectionMemberDeclarationexpression.final voidvisit(CollectionMemberExpression expression) Visits theCollectionMemberExpressionexpression.final voidvisit(CollectionValuedPathExpression expression) Visits theCollectionValuedPathExpressionexpression.final voidvisit(ComparisonExpression expression) Visits theComparisonExpressionexpression.final voidvisit(ConcatExpression expression) Visits theConcatExpressionexpression.final voidvisit(ConstructorExpression expression) Visits theConstructorExpressionexpression.final voidvisit(CountFunction expression) Visits theCountFunctionexpression.final voidVisits theDateTimeexpression.final voidvisit(DeleteClause expression) Visits theDeleteClauseexpression.final voidvisit(DeleteStatement expression) Visits theDeleteStatementexpression.final voidvisit(DivisionExpression expression) Visits theDivisionExpressionexpression.final voidvisit(EmptyCollectionComparisonExpression expression) Visits theEmptyCollectionComparisonExpressionexpression.final voidvisit(EntityTypeLiteral expression) Visits theEntityTypeLiteralexpression.final voidvisit(EntryExpression expression) Visits theEntryExpressionexpression.final voidvisit(ExistsExpression expression) Visits theExistsExpressionexpression.final voidvisit(FromClause expression) Visits theFromClauseexpression.final voidvisit(FunctionExpression expression) Visits theFunctionExpressionexpression.final voidvisit(GroupByClause expression) Visits theGroupByClauseexpression.final voidvisit(HavingClause expression) Visits theHavingClauseexpression.final voidvisit(IdentificationVariable expression) Visits theIdentificationVariableexpression.final voidvisit(IdentificationVariableDeclaration expression) Visits theIdentificationVariableDeclarationexpression.final voidvisit(IndexExpression expression) Visits theIndexExpressionexpression.final voidvisit(InExpression expression) Visits theInExpressionexpression.final voidvisit(InputParameter expression) Visits theInputParameterexpression.final voidVisits theJoinexpression.final voidvisit(JPQLExpression expression) Visits theJPQLExpressionexpression.final voidvisit(KeyExpression expression) Visits theKeyExpressionexpression.final voidvisit(KeywordExpression expression) Visits theKeywordExpressionexpression.final voidvisit(LengthExpression expression) Visits theLengthExpressionexpression.final voidvisit(LikeExpression expression) Visits theLikeExpressionexpression.final voidvisit(LocateExpression expression) Visits theLocateExpressionexpression.final voidvisit(LowerExpression expression) Visits theLowerExpressionexpression.final voidvisit(MaxFunction expression) Visits theMaxFunctionexpression.final voidvisit(MinFunction expression) Visits theMinFunctionexpression.final voidvisit(ModExpression expression) Visits theModExpressionexpression.final voidvisit(MultiplicationExpression expression) Visits theMultiplicationExpressionexpression.final voidvisit(NotExpression expression) Visits theNotExpressionexpression.final voidvisit(NullComparisonExpression expression) Visits theNullComparisonExpressionexpression.final voidvisit(NullExpression expression) Visits theNullExpressionexpression.final voidvisit(NullIfExpression expression) Visits theNullIfExpressionexpression.final voidvisit(NumericLiteral expression) Visits theNumericLiteralexpression.final voidvisit(ObjectExpression expression) Visits theObjectExpressionexpression.final voidVisits theOnClauseexpression.final voidvisit(OrderByClause expression) Visits theOrderByClauseexpression.final voidvisit(OrderByItem expression) Visits theOrderByItemexpression.final voidvisit(OrExpression expression) Visits theOrExpressionexpression.final voidvisit(RangeVariableDeclaration expression) Visits theRangeVariableDeclarationexpression.final voidvisit(ResultVariable expression) Visits theResultVariableexpression.final voidvisit(SelectClause expression) Visits theSelectClauseexpression.final voidvisit(SelectStatement expression) Visits theSelectStatementexpression.final voidvisit(SimpleFromClause expression) Visits theSimpleFromClauseexpression.final voidvisit(SimpleSelectClause expression) Visits theSimpleSelectClauseexpression.final voidvisit(SimpleSelectStatement expression) Visits theSimpleSelectStatementexpression.final voidvisit(SizeExpression expression) Visits theSizeExpressionexpression.final voidvisit(SqrtExpression expression) Visits theSqrtExpressionexpression.final voidvisit(StateFieldPathExpression expression) Visits theStateFieldPathExpressionexpression.final voidvisit(StringLiteral expression) Visits theStringLiteralexpression.final voidvisit(SubExpression expression) Visits theSubExpressionexpression.final voidvisit(SubstringExpression expression) Visits theSubstringExpressionexpression.final voidvisit(SubtractionExpression expression) Visits theSubtractionExpressionexpression.final voidvisit(SumFunction expression) Visits theSumFunctionexpression.final voidvisit(TreatExpression expression) Visits theTreatExpressionexpression.final voidvisit(TrimExpression expression) Visits theTrimExpressionexpression.final voidvisit(TypeExpression expression) Visits theTypeExpressionexpression.final voidvisit(UnknownExpression expression) Visits theUnknownExpressionexpression.final voidvisit(UpdateClause expression) Visits theUpdateClauseexpression.final voidvisit(UpdateItem expression) Visits theUpdateItemexpression.final voidvisit(UpdateStatement expression) Visits theUpdateStatementexpression.final voidvisit(UpperExpression expression) Visits theUpperExpressionexpression.final voidvisit(ValueExpression expression) Visits theValueExpressionexpression.final voidvisit(WhenClause expression) Visits theWhenClauseexpression.final voidvisit(WhereClause expression) Visits theWhereClauseexpression.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 Details
-
collectionValuedPathExpressionVisitor
protected AbstractSemanticValidator.CollectionValuedPathExpressionVisitor collectionValuedPathExpressionVisitorThis visitor is responsible to retrieve the visitedExpressionif it is aCollectionValuedPathExpression. -
helper
The given helper allows this validator to access the JPA artifacts without using Hermes SPI. -
registerIdentificationVariable
protected boolean registerIdentificationVariableThis flag is used to register theIdentificationVariablesthat 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
This visitor is responsible to retrieve the visitedExpressionif it is aStateFieldPathExpression. -
usedIdentificationVariables
TheIdentificationVariablesthat 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
This finder is responsible to retrieve the virtual identification variable from the UPDATE range declaration since it is optional.
-
-
Constructor Details
-
AbstractSemanticValidator
Creates a newAbstractSemanticValidator.- Parameters:
helper- The given helper allows this validator to access the JPA artifacts without using Hermes SPI- Throws:
NullPointerException- The givenSemanticValidatorHelpercannot benull
-
-
Method Details
-
buildComparingEntityTypeLiteralVisitor
protected AbstractSemanticValidator.ComparingEntityTypeLiteralVisitor buildComparingEntityTypeLiteralVisitor() -
buildInItemsVisitor
-
buildSubqueryFirstDeclarationVisitor
protected AbstractSemanticValidator.SubqueryFirstDeclarationVisitor buildSubqueryFirstDeclarationVisitor() -
buildTopLevelFirstDeclarationVisitor
protected AbstractSemanticValidator.TopLevelFirstDeclarationVisitor buildTopLevelFirstDeclarationVisitor() -
dispose
public void dispose()Description copied from class:AbstractValidatorDisposes this visitor.- Overrides:
disposein classAbstractValidator
-
findVirtualIdentificationVariable
Returns theIdentificationVariablethat defines the identification variable for either aDELETEor anUPDATEquery.- Parameters:
expression- TheAbstractSchemaNamethat is being validated and that most likely representing an associated path expression and not an entity name- Returns:
- The
IdentificationVariabledefining either the identification variable or the virtual identification variable for theDELETEor for theUPDATEquery
-
getCollectionValuedPathExpression
-
getCollectionValuedPathExpressionVisitor
protected AbstractSemanticValidator.CollectionValuedPathExpressionVisitor getCollectionValuedPathExpressionVisitor() -
getComparingEntityTypeLiteralVisitor
protected AbstractSemanticValidator.ComparingEntityTypeLiteralVisitor getComparingEntityTypeLiteralVisitor() -
getComparisonExpressionVisitor
-
getGrammar
Description copied from class:AbstractValidatorReturns theJPQLGrammarthat defines how the JPQL query was parsed.- Specified by:
getGrammarin classAbstractValidator- Returns:
- The
JPQLGrammarthat was used to parse the JPQL query
-
getInItemsVisitor
-
getStateFieldPathExpression
-
getStateFieldPathExpressionVisitor
protected AbstractSemanticValidator.StateFieldPathExpressionVisitor getStateFieldPathExpressionVisitor() -
getVirtualIdentificationVariableFinder
Returns the visitor that can find theIdentificationVariableof theRangeVariableDeclaration. This should be used when the query is either aDELETEorUPDATEquery.- Returns:
- The visitor that can traverse the query and returns the
IdentificationVariable
-
initialize
protected void initialize()Description copied from class:AbstractValidatorInitializes this validator.- Overrides:
initializein classAbstractValidator
-
isComparingEntityTypeLiteral
Determines whether the given identification variable is used in a comparison expression: "expression = LargeProject".- Parameters:
expression- TheIdentificationVariableused to determine its purpose- Returns:
trueif the identification variable is used in a comparison expression;falseotherwise
-
isIdentificationVariableDeclaredAfter
protected boolean isIdentificationVariableDeclaredAfter(String variableName, int variableNameIndex, int joinIndex, List<? extends JPQLQueryDeclaration> declarations) -
isIdentificationVariableValidInComparison
Determines whether an identification variable can be used in a comparison expression when the operator is either '<', '<=', '>', '>='.- Parameters:
expression- TheIdentificationVariablethat is mapped to either an entity, a singled-object value field, a collection-valued object field- Returns:
trueif it can be used in a ordering comparison expression;falseif it can't
-
isOrderComparison
Determines whether the givenComparisonExpressioncompares two expression using one of the following operators: '<', '<=', '>', '>='.- Parameters:
expression- TheComparisonExpressionto check what type of operator that is used- Returns:
trueif the operator is used to check for order;falseif 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:
trueif the expression is valid at the given index
-
selectClausePathExpressionPathType
Returns the type of path expression that is allowed in theSELECTclause.- 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
-
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
Validates the encapsulated expression of the givenABSexpression. 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- TheAbsExpressionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateAbstractFromClause
protected void validateAbstractFromClause(AbstractFromClause expression, AbstractSemanticValidator.FirstDeclarationVisitor visitor) Validates the givenFROMclause. This will validate the order of identification variable declarations.- Parameters:
expression- TheAbstractFromClauseto validatevisitor- TheAbstractSemanticValidator.FirstDeclarationVisitorto validate
-
validateAbstractSchemaName
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- TheAbstractSchemaNameto validate- Returns:
trueif the entity name was resolved;falseotherwise
-
validateAdditionExpression
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- TheAdditionExpressionto 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
Validates the givenAllOrAnyExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheAllOrAnyExpressionto validate
-
validateAndExpression
Validates the givenAndExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheAndExpressionto validate
-
validateArithmeticExpression
protected int validateArithmeticExpression(ArithmeticExpression expression, String leftExpressionWrongTypeMessageKey, 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- TheArithmeticExpressionto 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
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- TheArithmeticFactorto validate- Returns:
falseif the arithmetic factor expression was validated and is invalid;trueotherwise
-
validateAvgFunction
Validates the encapsulated expression of the givenAVGexpression. 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- TheAvgFunctionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateBetweenExpression
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- TheBetweenExpressionto 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
-
validateCaseExpression
Validates the givenCaseExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheCaseExpressionto validate
-
validateCoalesceExpression
Validates the givenCoalesceExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheCoalesceExpressionto validate
-
validateCollectionMemberDeclaration
Validates the givenCollectionMemberDeclaration.- Parameters:
expression- TheCollectionMemberDeclarationto validate
-
validateCollectionMemberExpression
Validates the givenCollectionMemberExpression. Only the collection-valued path expression is validated.- Parameters:
expression- TheCollectionMemberExpressionto 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 givenExpressionand makes sure it's a valid collection value path expression.- Parameters:
expression- TheExpressionto validatecollectionTypeOnly-trueto make sure the path expression resolves to a collection mapping only;falseif it can simply resolves to a relationship mapping- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateJoinCollectionValuedPathExpression
protected boolean validateJoinCollectionValuedPathExpression(Expression expression, boolean collectionTypeOnly) Validates the givenExpressionand 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- TheExpressionto validatecollectionTypeOnly-trueto make sure the path expression resolves to a collection mapping only;falseif it can simply resolves to a relationship mapping- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateComparisonExpression
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- TheConcatExpressionto validate by validating its left and right expressions- Returns:
- The status of the comparison between the left and right expression:
trueif the two expressions pass the rules defined by this method;falseotherwise
- If the comparison operator is either '=' or '<>'. The expressions can only be
-
validateConcatExpression
Validates the encapsulated expression of the givenCONCATexpression. 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- TheConcatExpressionto validate by validating its encapsulated expression- Returns:
falseif the first encapsulated expression was validated and is invalid;trueotherwise
-
validateConstructorExpression
Validates the givenConstructorExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheConstructorExpressionto validate
-
validateCountFunction
Validates the givenCountFunction. The default behavior does not require to semantically validate it.- Parameters:
expression- TheCountFunctionto validate
-
validateDateTime
Validates the givenDateTime. The default behavior does not require to semantically validate it.- Parameters:
expression- TheDateTimeto validate
-
validateDeleteClause
Validates the givenDeleteClause. The default behavior does not require to semantically validate it.- Parameters:
expression- TheDeleteClauseto validate
-
validateDeleteStatement
Validates the givenDeleteStatement. The default behavior does not require to semantically validate it.- Parameters:
expression- TheDeleteStatementto validate
-
validateDivisionExpression
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- TheDivisionExpressionto 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
-
validateEntryExpression
Validates the givenEntryExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheEntryExpressionto validate
-
validateExistsExpression
Validates the givenExistsExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheExistsExpressionto validate
-
validateFirstDeclaration
protected void validateFirstDeclaration(AbstractFromClause expression, JPQLQueryDeclaration declaration, AbstractSemanticValidator.FirstDeclarationVisitor visitor) -
validateFromClause
Validates the givenFromClause.- Parameters:
expression- TheFromClauseto validate
-
validateFunctionExpression
Validates the givenFunctionExpression.- Parameters:
expression- TheFunctionExpressionto validate
-
validateFunctionPathExpression
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- TheAbstractSingleEncapsulatedExpressionto validate its encapsulated expression if it's a state field path expression, otherwise does nothing- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
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- TheCompoundExpressionto 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
Validates the givenGroupByClause. The default behavior does not require to semantically validate it.- Parameters:
expression- TheGroupByClauseto validate
-
validateHavingClause
Validates the givenHavingClause. The default behavior does not require to semantically validate it.- Parameters:
expression- TheHavingClauseto validate
-
validateIdentificationVariable
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:
trueif the given identification variable is valid;falseotherwise
-
validateIdentificationVariable
protected boolean validateIdentificationVariable(IdentificationVariable expression, String variable) Validates the given identification variable. The default behavior is to not validate it.- Parameters:
expression- TheIdentificationVariablethat is being visitedvariable- The actual identification variable, which is never an empty string- Returns:
trueif the given identification variable is valid;falseotherwise
-
validateIdentificationVariableDeclaration
protected void validateIdentificationVariableDeclaration(IdentificationVariableDeclaration expression) Validates the givenInExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheInExpressionto validate
-
validateIdentificationVariables
protected void validateIdentificationVariables()Validates the identification variables:- Assures those used throughout the query have been defined in the
FROMclause 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
Validates the givenIndexExpression. It validates the identification variable and makes sure is it defined inINorINexpression.- Parameters:
expression- TheIndexExpressionto validate- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateInExpression
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- TheInExpressionto validate
-
validateJoin
Validates the givenJoin.- Parameters:
expression- TheValueExpressionto validate
-
validateJoinsIdentificationVariable
protected void validateJoinsIdentificationVariable(AbstractFromClause expression, List<? extends JPQLQueryDeclaration> declarations, JPQLQueryDeclaration declaration, int index) -
validateKeyExpression
Validates the givenKeyExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheKeyExpressionto validate
-
validateLengthExpression
Validates the encapsulated expression of the givenLENGTHexpression. 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- TheLengthExpressionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateLikeExpression
Validates the string expression of the givenLIKEexpression. 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- TheLengthExpressionto 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
Validates the encapsulated expression of the givenLOCATEexpression. 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- TheLocateExpressionto 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
Validates the encapsulated expression of the givenLOWERexpression. 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- TheLowerExpressionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateMaxFunction
Validates the encapsulated expression of the givenMAXexpression. 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- TheMaxFunctionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is not valid;trueotherwise
-
validateMinFunction
Validates the encapsulated expression of the givenMINexpression. 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- TheMinFunctionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is not valid;trueotherwise
-
validateModExpression
Validates the encapsulated expression of the givenMODexpression. 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- TheModExpressionto 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
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- TheMultiplicationExpressionto 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
Validates the givenNotExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheNotExpressionto validate
-
validateNullComparisonExpression
Validates the givenNullComparisonExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheNullComparisonExpressionto validate
-
validateNullIfExpression
Validates the givenNullIfExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheNullIfExpressionto validate
-
validateObjectExpression
Validates the givenObjectExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheObjectExpressionto validate
-
validateOnClause
Validates the givenOnClause. The default behavior does not require to semantically validate it.- Parameters:
expression- TheOnClauseto validate
-
validateOrderByClause
Validates the givenOrderByItem. The default behavior does not require to semantically validate it.- Parameters:
expression- TheOrderByItemto validate
-
validateOrderByItem
Validates the givenOrderByItem. The default behavior does not require to semantically validate it.- Parameters:
expression- TheOrderByItemto validate
-
validateOrExpression
Validates the givenOrExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheOrExpressionto validate
-
validateRangeVariableDeclaration
Validates the givenRangeVariableDeclaration.- Parameters:
expression- TheRangeVariableDeclarationto validate
-
validateRangeVariableDeclarationRootObject
Validates the "root" object of the givenRangeVariableDeclaration.- Parameters:
expression- TheRangeVariableDeclarationthat needs its "root" object to be validated
-
validateResultVariable
Validates the givenResultVariable. The default behavior does not require to semantically validate it.- Parameters:
expression- TheResultVariableto validate
-
validateSelectClause
Validates the givenSelectClause. The default behavior does not require to semantically validate it.- Parameters:
expression- TheSelectClauseto validate
-
validateSelectStatement
Validates the givenSelectStatement. The default behavior does not require to semantically validate it.- Parameters:
expression- TheSelectStatementto validate
-
validateSimpleFromClause
Validates the givenSimpleFromClause.- Parameters:
expression- TheSimpleFromClauseto validate
-
validateSimpleSelectClause
Validates the givenSimpleSelectClause. The default behavior does not require to semantically validate it.- Parameters:
expression- TheSimpleSelectClauseto validate
-
validateSimpleSelectStatement
-
validateSizeExpression
Validates the givenSizeExpression.- Parameters:
expression- TheSizeExpressionto validate- Returns:
falseif the encapsulated expression is a collection-valued path expression and it was found to be invalid;trueotherwise
-
validateSqrtExpression
Validates the encapsulated expression of the givenSQRTexpression. 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- TheSqrtExpressionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateStateFieldPathExpression
protected boolean validateStateFieldPathExpression(StateFieldPathExpression expression, AbstractSemanticValidator.PathType pathType) Validates the givenStateFieldPathExpression.- Parameters:
expression- TheStateFieldPathExpressionthe validatepathType- The type of field that is allowed- Returns:
trueif the givenStateFieldPathExpressionresolves to a valid path;falseotherwise
-
validateSubstringExpression
Validates the encapsulated expression of the givenSUBSTRINGexpression. 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- TheSubstringExpressionto 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
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- TheSubtractionExpressionto 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
Validates the encapsulated expression of the givenMODexpression. 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- TheModExpressionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateThirdPartyStateFieldPathExpression
Validates the givenStateFieldPathExpression, which means the path does not represent a mapping, or an enum constant.- Parameters:
expression- TheStateFieldPathExpressionthe validate- Returns:
Boolean.TRUEorBoolean.FALSEif the givenStateFieldPathExpressionwas validated by this method;nullif it could not be validated (as being valid or invalid)
-
validateTreatExpression
Validates the givenTreatExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheTreatExpressionto validate
-
validateTrimExpression
Validates the encapsulated expression of the givenTRIMexpression. 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- TheTrimExpressionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateTypeExpression
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- TheTypeExpressionto validate- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateUpdateClause
Validates the givenUpdateClause. The default behavior does not require to semantically validate it.- Parameters:
expression- TheUpdateClauseto validate
-
validateUpdateItem
Validates the givenUpdateItemby 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-UpdateItemto validate its path expression- Returns:
trueif the path expression is valid;falseotherwise
-
validateUpdateStatement
Validates the givenUpdateStatement. The default behavior does not require to semantically validate it.- Parameters:
expression- TheUpdateStatementto validate
-
validateUpperExpression
Validates the encapsulated expression of the givenUPPERexpression. 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- TheUpperExpressionto validate by validating its encapsulated expression- Returns:
falseif the encapsulated expression was validated and is invalid;trueotherwise
-
validateValueExpression
Validates the givenValueExpression. The default behavior does not require to semantically validate it.- Parameters:
expression- TheValueExpressionto validate
-
validateWhenClause
Validates the givenWhenClause. The default behavior does not require to semantically validate it.- Parameters:
expression- TheWhenClauseto validate
-
validateWhereClause
Validates the givenWhereClause. The default behavior does not require to semantically validate it.- Parameters:
expression- TheWhereClauseto validate
-
validPathExpressionTypeForCountFunction
Returns the type of path expression that is valid for a count function; which is the left expression in aCOUNTexpression.- Returns:
- By default, any field are allowed except collection
-
validPathExpressionTypeForInExpression
Returns the type of path expression that is valid for the expression being tested by anINexpression; which is the left expression.- Returns:
- By default, any field (without collection) is allowed
-
validPathExpressionTypeForInItem
Returns the type of path expression that is valid for anINitems; which is the left expression in aINexpression.- Returns:
- By default, any field are allowed except collection
-
validPathExpressionTypeForStringExpression
Returns the type of path expression that is valid for a string expression; which is the left expression in aLIKEexpression.- Returns:
- By default, only basic field are allowed
-
visit
Description copied from interface:ExpressionVisitorVisits theAbsExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theAbstractSchemaNameexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theAdditionExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theAllOrAnyExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theAndExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theArithmeticFactorexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theAvgFunctionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theBadExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theBetweenExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theCaseExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theCoalesceExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theCollectionExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theCollectionMemberDeclarationexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theCollectionMemberExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theCollectionValuedPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theComparisonExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theConcatExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theConstructorExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theCountFunctionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theDateTimeexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theDeleteClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theDeleteStatementexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theDivisionExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theEmptyCollectionComparisonExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theEntityTypeLiteralexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theEntryExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theExistsExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theFromClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theFunctionExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theGroupByClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theHavingClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theIdentificationVariableexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theIdentificationVariableDeclarationexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theIndexExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theInExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theInputParameterexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theJoinexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theJPQLExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theKeyExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theKeywordExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theLengthExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theLikeExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theLocateExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theLowerExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theMaxFunctionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theMinFunctionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theModExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theMultiplicationExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theNotExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theNullComparisonExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theNullExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theNullIfExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theNumericLiteralexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theObjectExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theOnClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theOrderByClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theOrderByItemexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theOrExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theRangeVariableDeclarationexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theResultVariableexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSelectClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSelectStatementexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSimpleFromClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSimpleSelectClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSimpleSelectStatementexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSizeExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSqrtExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theStateFieldPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theStringLiteralexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSubExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSubstringExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSubtractionExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theSumFunctionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theTreatExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theTrimExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theTypeExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theUnknownExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheUnknownExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theUpdateClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheUpdateClauseto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theUpdateItemexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheUpdateItemto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theUpdateStatementexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheUpdateStatementto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theUpperExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheUpperExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theValueExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheValueExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theWhenClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheWhenClauseto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theWhereClauseexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheWhereClauseto visit
-