public class EclipseLinkGrammarValidator extends AbstractGrammarValidator implements EclipseLinkExpressionVisitor
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.
Modifier and Type | Class and Description |
---|---|
protected static class |
EclipseLinkGrammarValidator.InExpressionVisitor |
protected static class |
EclipseLinkGrammarValidator.InExpressionWithNestedArrayVisitor |
AbstractGrammarValidator.AbstractCollectionValidator, AbstractGrammarValidator.AbstractDoubleEncapsulatedExpressionHelper<T extends AbstractDoubleEncapsulatedExpression>, AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T extends AbstractEncapsulatedExpression>, AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>, AbstractGrammarValidator.AbstractTripleEncapsulatedExpressionHelper<T extends AbstractTripleEncapsulatedExpression>, AbstractGrammarValidator.CollectionExpressionVisitor, AbstractGrammarValidator.CollectionSeparatedByCommaValidator, AbstractGrammarValidator.CollectionSeparatedBySpaceValidator, AbstractGrammarValidator.ComparisonExpressionVisitor, AbstractGrammarValidator.DateTimeVisitor, AbstractGrammarValidator.NullExpressionVisitor
AbstractValidator.BypassChildCollectionExpressionVisitor, AbstractValidator.BypassParentSubExpressionVisitor, AbstractValidator.ChildrenCollectorVisitor, AbstractValidator.JPQLQueryBNFValidator, AbstractValidator.NestedArrayVisitor, AbstractValidator.OwningClauseVisitor, AbstractValidator.OwningStatementVisitor, AbstractValidator.SubqueryVisitor
Constructor and Description |
---|
EclipseLinkGrammarValidator(JPQLGrammar jpqlGrammar)
Creates a new
EclipseLinkGrammarValidator . |
absExpressionHelper, allOrAnyExpressionHelper, avgFunctionHelper, buildAbsExpressionHelper, buildAllOrAnyExpressionHelper, buildAvgFunctionHelper, buildCoalesceExpressionHelper, buildCollectionExpressionVisitor, buildConcatExpressionHelper, buildCountFunctionHelper, buildDateTimeVisitor, buildEntryExpressionHelper, buildExistsExpressionHelper, buildFunctionExpressionHelper, buildIndexExpressionHelper, buildKeyExpressionHelper, buildLengthExpressionHelper, buildLocateExpressionHelper, buildLowerExpressionHelper, buildMaxFunctionHelper, buildMinFunctionHelper, buildModExpressionHelper, buildNullExpressionVisitor, buildNullIfExpressionHelper, buildObjectExpressionHelper, buildSizeExpressionHelper, buildSqrtExpressionHelper, buildSubstringExpressionHelper, buildSumFunctionHelper, buildTrimExpressionHelper, buildTypeExpressionHelper, buildUpperExpressionHelper, buildValueExpressionHelper, coalesceExpressionHelper, collectionSeparatedByCommaValidator, collectionSeparatedBySpaceValidator, comparisonExpressionVisitor, concatExpressionHelper, countFunctionHelper, dispose, entryExpressionHelper, existsExpressionHelper, functionExpressionHelper, getCollectionExpression, getCollectionExpressionVisitor, getDateTimeVisitor, getGrammar, getHelper, indexExpressionHelper, initialize, isChildOfComparisonExpession, isCollectionExpression, isDateTimeConstant, isJPA1_0, isJPA2_0, isJPA2_1, isNewerThan, isNewerThanOrEqual, isNumericLiteral, isOlderThan, isOlderThanOrEqual, isOwnedByConditionalClause, isOwnedByFromClause, isOwnedBySubFromClause, isValidJavaIdentifier, keyExpressionHelper, lengthExpressionHelper, locateExpressionHelper, lowerExpressionHelper, maxFunctionHelper, minFunctionHelper, modExpressionHelper, nullIfExpressionHelper, objectExpressionHelper, position, registerHelper, sizeExpressionHelper, sqrtExpressionHelper, substringExpressionHelper, sumFunctionHelper, trimExpressionHelper, typeExpressionHelper, upperExpressionHelper, validateAbstractConditionalClause, validateAbstractDoubleEncapsulatedExpression, validateAbstractFromClause, validateAbstractSelectStatement, validateAbstractSingleEncapsulatedExpression, validateAbstractTripleEncapsulatedExpression, validateAggregateFunctionLocation, validateArithmeticExpression, validateCollectionSeparatedByComma, validateCollectionSeparatedBySpace, validateCompoundExpression, validateIdentificationVariableDeclaration, validateIdentifier, validateInputParameters, validateJoins, validateLikeExpressionEscapeCharacter, validateLogicalExpression, validateOwningClause, validatePathExpression, validateSimpleSelectStatement, valueExpressionHelper, 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
addProblem, addProblem, addProblem, addProblem, buildChildrenCollector, buildNestedArrayVisitor, buildOwningStatementVisitor, buildProblem, buildSubqueryVisitor, getBypassChildCollectionExpressionVisitor, getBypassParentSubExpressionVisitor, getChildren, getChildrenCollectorVisitor, getExpressionRegistry, getExpressionValidator, getJPAVersion, getJPQLQueryBNFValidator, getJPQLQueryBNFValidator, getLiteralVisitor, getNestedArrayVisitor, getOwningStatementVisitor, getProvider, getProviderVersion, getQueryBNF, getSubqueryVisitor, isNestedArray, isSubquery, isValid, isValid, isValid, isValidWithChildCollectionBypass, isWithinSubquery, isWithinTopLevelQuery, length, literal, nestedArraySize, position, problemsSize, setProblems, visit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
public EclipseLinkGrammarValidator(JPQLGrammar jpqlGrammar)
EclipseLinkGrammarValidator
.jpqlGrammar
- The JPQLGrammar
that defines how the JPQL query was parsedprotected AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<CastExpression> buildCastExpressionHelper()
protected AbstractGrammarValidator.AbstractDoubleEncapsulatedExpressionHelper<DatabaseType> buildDatabaseTypeHelper()
protected AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<ExtractExpression> buildExtractExpressionHelper()
protected EclipseLinkGrammarValidator.InExpressionVisitor buildInExpressionVisitor()
protected EclipseLinkGrammarValidator.InExpressionWithNestedArrayVisitor buildInExpressionWithNestedArrayVisitor()
protected LiteralVisitor buildLiteralVisitor()
buildLiteralVisitor
in class AbstractValidator
LiteralVisitor
protected AbstractValidator.OwningClauseVisitor buildOwningClauseVisitor()
Expression
and stops at
the first Expression
that is a clause.buildOwningClauseVisitor
in class AbstractValidator
AbstractValidator.OwningClauseVisitor
protected AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<TableExpression> buildTableExpressionHelper()
protected AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<CastExpression> castExpressionHelper()
protected AbstractGrammarValidator.AbstractDoubleEncapsulatedExpressionHelper<DatabaseType> databaseTypeHelper()
protected AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<ExtractExpression> extractExpressionHelper()
protected EclipseLinkGrammarValidator.InExpressionVisitor getInExpressionVisitor()
protected EclipseLinkGrammarValidator.InExpressionWithNestedArrayVisitor getInExpressionWithNestedArray()
protected AbstractEclipseLinkSemanticValidator.EclipseLinkOwningClauseVisitor getOwningClauseVisitor()
Expression
and stops at
the first Expression
that is a clause.getOwningClauseVisitor
in class AbstractValidator
AbstractValidator.OwningClauseVisitor
protected final boolean isEclipseLink()
true
if the persistence provider is EclipseLink; false
otherwiseprotected boolean isInExpressionWithNestedArray(SimpleSelectClause expression)
IN
expression where the
left expression is a nested array.expression
- The SimpleSelectClause
of the subquerytrue
if the subquery is in an IN
expression and its
left expression is a nested arrayprotected boolean isInputParameterInValidLocation(InputParameter expression)
isInputParameterInValidLocation
in class AbstractGrammarValidator
protected boolean isJoinFetchIdentifiable()
JOIN FETCH
expression can be identified by with an
identification variable or not.isJoinFetchIdentifiable
in class AbstractGrammarValidator
true
if the expression can have an identification variable;
false
otherwiseprotected boolean isMultipleSubquerySelectItemsAllowed(SimpleSelectClause expression)
SELECT
clause can return more than
one item or just a single. By default, only one item can be returned.isMultipleSubquerySelectItemsAllowed
in class AbstractGrammarValidator
expression
- The subquery SELECT
clausetrue
if it can return more than one item; false
if it needs
to return only one itemprotected boolean isOwnedByInExpression(Expression expression)
protected boolean isOwnedByUnionClause(Expression expression)
Expression
is a child of the UNION clause.expression
- The Expression
to visit its parent hierarchy up to the clausetrue
if the first parent being a clause is the UNION clause;
false
otherwiseprotected boolean isSubqueryAllowedAnywhere()
isSubqueryAllowedAnywhere
in class AbstractGrammarValidator
true
if a subquery can be defined in any clause; false
if
it can only be used within the WHERE
and HAVING
defined by the JPA
1.0 and 2.0 specification documentprotected AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<TableExpression> tableExpressionHelper()
protected void validateAbstractSelectClause(AbstractSelectClause expression, boolean multipleSelectItemsAllowed)
SELECT
clause. The select expression
will only be visited if its JPQL query BNF is part of the select item BNF.validateAbstractSelectClause
in class AbstractGrammarValidator
expression
- The AbstractSelectClause
to validatemultipleSelectItemsAllowed
- Determines whether the SELECT
can have
one or more select expression or notpublic void visit(AsOfClause expression)
AsOfClause
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The Expression
to visitpublic void visit(CastExpression expression)
CastExpression
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The Expression
to visitpublic void visit(ConnectByClause expression)
ConnectByClause
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The ConnectByClause
to visitpublic void visit(DatabaseType expression)
DatabaseType
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The DatabaseType
to visitpublic void visit(ExtractExpression expression)
ExtractExpression
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The Expression
to visitpublic void visit(HierarchicalQueryClause expression)
HierarchicalQueryClause
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The HierarchicalQueryClause
to visitpublic void visit(OrderSiblingsByClause expression)
OrderSiblingsByClause
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The Expression
to visitpublic void visit(RegexpExpression expression)
RegexpExpression
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The Expression
to visitpublic void visit(StartWithClause expression)
StartWithClause
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The StartWithClause
to visitpublic void visit(TableExpression expression)
TableExpression
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The Expression
to visitpublic void visit(TableVariableDeclaration expression)
TableVariableDeclaration
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The Expression
to visitpublic void visit(UnionClause expression)
UnionClause
expression.visit
in interface EclipseLinkExpressionVisitor
expression
- The Expression
to visit