Class EclipseLinkSemanticValidator
- All Implemented Interfaces:
EclipseLinkExpressionVisitor
,ExpressionVisitor
For instance, the function AVG accepts a state field path. The property it represents has
to be of numeric type. AVG(e.name) is parsable but is not semantically valid because the
type of name is a string (the property signature is: "private String name
").
Note: EclipseLink does not validate types, but leaves it to the database. This is because
some databases such as Oracle allow different types to different functions and perform implicit
type conversion. i.e. CONCAT('test', 2)
returns 'test2'
. Also the
FUNC function has an unknown type, so should be allowed with any function.
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
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.persistence.jpa.jpql.AbstractEclipseLinkSemanticValidator
AbstractEclipseLinkSemanticValidator.EclipseLinkOwningClauseVisitor, AbstractEclipseLinkSemanticValidator.SubquerySelectItemCalculator, AbstractEclipseLinkSemanticValidator.TableExpressionVisitor, AbstractEclipseLinkSemanticValidator.TopLevelFirstDeclarationVisitor
Nested classes/interfaces inherited from class org.eclipse.persistence.jpa.jpql.AbstractSemanticValidator
AbstractSemanticValidator.CollectionValuedPathExpressionVisitor, AbstractSemanticValidator.ComparingEntityTypeLiteralVisitor, AbstractSemanticValidator.ComparisonExpressionVisitor, AbstractSemanticValidator.FirstDeclarationVisitor, AbstractSemanticValidator.InItemsVisitor, AbstractSemanticValidator.PathType, AbstractSemanticValidator.StateFieldPathExpressionVisitor, AbstractSemanticValidator.SubqueryFirstDeclarationVisitor
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 inherited from class org.eclipse.persistence.jpa.jpql.AbstractSemanticValidator
collectionValuedPathExpressionVisitor, helper, registerIdentificationVariable, stateFieldPathExpressionVisitor, usedIdentificationVariables, virtualIdentificationVariableFinder
-
Constructor Summary
ConstructorsConstructorDescriptionEclipseLinkSemanticValidator
(SemanticValidatorHelper helper, EclipseLinkSemanticValidatorExtension extension) Creates a newEclipseLinkSemanticValidator
.EclipseLinkSemanticValidator
(JPQLQueryContext queryContext) Deprecated.EclipseLinkSemanticValidator
(JPQLQueryContext queryContext, EclipseLinkSemanticValidatorExtension extension) Creates a newEclipseLinkSemanticValidator
. -
Method Summary
Methods inherited from class org.eclipse.persistence.jpa.jpql.AbstractEclipseLinkSemanticValidator
buildLiteralVisitor, buildOwningClauseVisitor, buildSubquerySelectItemCalculator, buildTableExpressionVisitor, buildTopLevelFirstDeclarationVisitor, getDeclaration, getExtension, getSubquerySelectItemCalculator, getTableExpressionVisitor, isTableExpression, selectClausePathExpressionPathType, subquerySelectItemCount, validateFunctionExpression, validateInExpression, validateRangeVariableDeclarationRootObject, validateThirdPartyStateFieldPathExpression, validPathExpressionTypeForCountFunction, validPathExpressionTypeForInExpression, validPathExpressionTypeForInItem, validPathExpressionTypeForStringExpression, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
Methods inherited from class org.eclipse.persistence.jpa.jpql.AbstractSemanticValidator
buildComparingEntityTypeLiteralVisitor, buildInItemsVisitor, buildSubqueryFirstDeclarationVisitor, dispose, findVirtualIdentificationVariable, getCollectionValuedPathExpression, getCollectionValuedPathExpressionVisitor, getComparingEntityTypeLiteralVisitor, getComparisonExpressionVisitor, getGrammar, getInItemsVisitor, getStateFieldPathExpression, getStateFieldPathExpressionVisitor, getVirtualIdentificationVariableFinder, initialize, isComparingEntityTypeLiteral, isIdentificationVariableDeclaredAfter, isIdentificationVariableValidInComparison, isOrderComparison, isValid, subqueryFirstDeclarationVisitor, topLevelFirstDeclarationVisitor, updateStatus, validateAbsExpression, validateAbstractFromClause, validateAbstractSchemaName, validateAdditionExpression, validateAllOrAnyExpression, validateAndExpression, validateArithmeticExpression, validateArithmeticExpression, validateAvgFunction, validateBetweenExpression, validateCaseExpression, validateCoalesceExpression, validateCollectionMemberDeclaration, validateCollectionMemberExpression, validateCollectionValuedPathExpression, validateComparisonExpression, validateConcatExpression, validateConstructorExpression, validateCountFunction, validateDateTime, validateDeleteClause, validateDeleteStatement, validateDivisionExpression, validateEntityTypeLiteral, validateEntryExpression, validateExistsExpression, validateFirstDeclaration, validateFromClause, validateFunctionPathExpression, validateFunctionPathExpression, validateGroupByClause, validateHavingClause, validateIdentificationVariable, validateIdentificationVariable, validateIdentificationVariableDeclaration, validateIdentificationVariables, validateIndexExpression, validateJoin, validateJoinCollectionValuedPathExpression, validateJoinsIdentificationVariable, validateKeyExpression, validateLengthExpression, validateLikeExpression, validateLocateExpression, validateLowerExpression, validateMaxFunction, validateMinFunction, validateModExpression, validateMultiplicationExpression, validateNotExpression, validateNullComparisonExpression, validateNullIfExpression, validateObjectExpression, validateOnClause, validateOrderByClause, validateOrderByItem, validateOrExpression, validateRangeVariableDeclaration, validateResultVariable, validateSelectClause, validateSelectStatement, validateSimpleFromClause, validateSimpleSelectClause, validateSimpleSelectStatement, validateSizeExpression, validateSqrtExpression, validateStateFieldPathExpression, validateSubstringExpression, validateSubtractionExpression, validateSumFunction, validateTreatExpression, validateTrimExpression, validateTypeExpression, validateUpdateClause, validateUpdateItem, validateUpdateStatement, validateUpperExpression, validateValueExpression, validateWhenClause, validateWhereClause, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
Methods inherited from class org.eclipse.persistence.jpa.jpql.AbstractValidator
addProblem, addProblem, addProblem, addProblem, buildChildrenCollector, buildNestedArrayVisitor, 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
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.jpa.jpql.parser.ExpressionVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Constructor Details
-
EclipseLinkSemanticValidator
Deprecated.Creates a newEclipseLinkSemanticValidator
.- Parameters:
queryContext
- The context used to query information about the JPQL query- Throws:
NullPointerException
- The givenJPQLQueryContext
cannot benull
-
EclipseLinkSemanticValidator
public EclipseLinkSemanticValidator(JPQLQueryContext queryContext, EclipseLinkSemanticValidatorExtension extension) Creates a newEclipseLinkSemanticValidator
.- Parameters:
queryContext
- The context used to query information about the JPQL queryextension
- The following extension can be used to give access to non-JPA metadata artifacts, such as database tables and columns- Throws:
NullPointerException
- The givenJPQLQueryContext
cannot benull
-
EclipseLinkSemanticValidator
public EclipseLinkSemanticValidator(SemanticValidatorHelper helper, EclipseLinkSemanticValidatorExtension extension) Creates a newEclipseLinkSemanticValidator
.- Parameters:
helper
- The given helper allows this validator to access the JPA artifacts without using Hermes SPIextension
- The following extension can be used to give access to non-JPA metadata artifacts, such as database tables and columns- Throws:
NullPointerException
- The givenSemanticValidatorHelper
cannot benull
-
EclipseLinkSemanticValidator(JPQLQueryContext, EclipseLinkSemanticValidatorExtension)