Class EclipseLinkContentAssistVisitor
java.lang.Object
org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
org.eclipse.persistence.jpa.jpql.tools.AbstractContentAssistVisitor
org.eclipse.persistence.jpa.jpql.tools.EclipseLinkContentAssistVisitor
- All Implemented Interfaces:
EclipseLinkExpressionVisitor
,ExpressionVisitor
public class EclipseLinkContentAssistVisitor
extends AbstractContentAssistVisitor
implements EclipseLinkExpressionVisitor
This extension over the default content assist visitor adds the additional support EclipseLink
provides.
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
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static final class
protected static final class
protected static final class
protected static final class
This visitor adds support for the additional clauses provided by EclipseLink, such as theprotected class
protected class
protected class
This subclass adds support for EclipseLink specific support.protected class
protected class
protected class
protected class
Nested classes/interfaces inherited from class org.eclipse.persistence.jpa.jpql.tools.AbstractContentAssistVisitor
AbstractContentAssistVisitor.AbstractAppendableExpressionVisitor, AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper<T extends Expression>, AbstractContentAssistVisitor.AbstractFromClauseStatementHelper<T extends AbstractSelectStatement>, AbstractContentAssistVisitor.AbstractGroupByClauseStatementHelper<T extends AbstractSelectStatement>, AbstractContentAssistVisitor.AbstractHavingClauseStatementHelper<T extends AbstractSelectStatement>, AbstractContentAssistVisitor.AbstractSelectClauseCollectionHelper<T extends AbstractSelectClause>, AbstractContentAssistVisitor.AbstractSelectClauseStatementHelper, AbstractContentAssistVisitor.AbstractWhereClauseSelectStatementHelper<T extends AbstractSelectStatement>, AbstractContentAssistVisitor.AppendableType, AbstractContentAssistVisitor.CollectionExpressionHelper<T extends Expression>, AbstractContentAssistVisitor.CollectionExpressionVisitor, AbstractContentAssistVisitor.CollectionMappingFilter, AbstractContentAssistVisitor.ConcatExpressionCollectionHelper, AbstractContentAssistVisitor.ConditionalClauseCollectionHelper, AbstractContentAssistVisitor.ConstrutorCollectionHelper, AbstractContentAssistVisitor.DeclarationVisitor, AbstractContentAssistVisitor.DefaultMappingCollector, AbstractContentAssistVisitor.DeleteClauseCollectionHelper, AbstractContentAssistVisitor.DeleteClauseStatementHelper, AbstractContentAssistVisitor.DifferentComparisonFilter, AbstractContentAssistVisitor.DoubleEncapsulatedCollectionHelper, AbstractContentAssistVisitor.EncapsulatedExpressionVisitor, AbstractContentAssistVisitor.EnumVisitor, AbstractContentAssistVisitor.FilteringMappingCollector, AbstractContentAssistVisitor.FollowingInvalidExpressionVisitor, AbstractContentAssistVisitor.GroupByClauseCollectionHelper, AbstractContentAssistVisitor.GroupByClauseStatementHelper, AbstractContentAssistVisitor.HavingClauseStatementHelper, AbstractContentAssistVisitor.IdentificationVariableType, AbstractContentAssistVisitor.InvalidExpressionVisitor, AbstractContentAssistVisitor.JoinCollectionHelper, AbstractContentAssistVisitor.MappingCollector, AbstractContentAssistVisitor.MappingFilterBuilder, AbstractContentAssistVisitor.MappingTypeFilter, AbstractContentAssistVisitor.NotExpressionVisitor, AbstractContentAssistVisitor.OrderByClauseCollectionHelper, AbstractContentAssistVisitor.PropertyMappingFilter, AbstractContentAssistVisitor.RangeVariableDeclarationVisitor, AbstractContentAssistVisitor.ResultVariableVisitor, AbstractContentAssistVisitor.SelectClauseCollectionHelper, AbstractContentAssistVisitor.SelectClauseStatementHelper, AbstractContentAssistVisitor.SimpleGroupByClauseStatementHelper, AbstractContentAssistVisitor.SimpleHavingClauseStatementHelper, AbstractContentAssistVisitor.SimpleSelectClauseCollectionHelper, AbstractContentAssistVisitor.SimpleSelectClauseStatementHelper, AbstractContentAssistVisitor.SimpleWhereClauseSelectStatementHelper, AbstractContentAssistVisitor.StatementHelper<T extends Expression>, AbstractContentAssistVisitor.SubqueryAppendableExpressionVisitor, AbstractContentAssistVisitor.SubqueryVisitor, AbstractContentAssistVisitor.TripleEncapsulatedCollectionHelper, AbstractContentAssistVisitor.UpdateClauseStatementHelper, AbstractContentAssistVisitor.UpdateItemCollectionHelper, AbstractContentAssistVisitor.VisitParentVisitor, AbstractContentAssistVisitor.WhenClauseConditionalClauseCollectionHelper, AbstractContentAssistVisitor.WhereClauseDeleteStatementHelper, AbstractContentAssistVisitor.WhereClauseSelectStatementHelper, AbstractContentAssistVisitor.WhereClauseUpdateStatementHelper, AbstractContentAssistVisitor.WithinInvalidExpressionVisitor
-
Field Summary
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.AbstractContentAssistVisitor
corrections, helpers, identifierFilters, INVALID_IDENTIFIER_FILTER, lockedExpressions, proposals, queryContext, queryPosition, SPACE_LENGTH, VALID_IDENTIFIER_FILTER, virtualSpaces, word, wordParser
-
Constructor Summary
ConstructorDescriptionEclipseLinkContentAssistVisitor
(JPQLQueryContext queryContext) Creates a newEclipseLinkContentAssistVisitor
. -
Method Summary
Modifier and TypeMethodDescriptionprotected EclipseLinkVersion
Returns the enum constant of the EclipseLink version specified in theJPQLQueryContext
.protected JPQLGrammar
Returns the latest supported JPQL grammar, which is required when checking the validity of a JPQL identifier.protected String
getTableName
(String variableName) protected void
Initializes this visitor.protected boolean
Determines whether aJOIN FETCH
expression can be identified by with an identification variable or not.protected boolean
isTableExpression
(Expression expression) void
visit
(AsOfClause expression) Visits theAsOfClause
expression.void
visit
(CastExpression expression) Visits theCastExpression
expression.void
visit
(ConnectByClause expression) Visits theConnectByClause
expression.void
visit
(DatabaseType expression) Visits theDatabaseType
expression.void
visit
(ExtractExpression expression) Visits theExtractExpression
expression.void
visit
(HierarchicalQueryClause expression) Visits theHierarchicalQueryClause
expression.void
visit
(OrderByItem expression) Visits theOrderByItem
expression.void
visit
(OrderSiblingsByClause expression) Visits theOrderSiblingsByClause
expression.void
visit
(RegexpExpression expression) Visits theRegexpExpression
expression.void
visit
(StartWithClause expression) Visits theStartWithClause
expression.void
visit
(TableExpression expression) Visits theTableExpression
expression.void
visit
(TableVariableDeclaration expression) Visits theTableVariableDeclaration
expression.void
visit
(UnionClause expression) Visits theUnionClause
expression.protected void
visitThirdPartyPathExpression
(AbstractPathExpression expression, String variableName) Visits the givenAbstractPathExpression
and attempts to find valid proposals that is not provided by the default implementation.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.AbstractContentAssistVisitor
addAggregateIdentifier, addAggregateIdentifiers, addAggregateIdentifiers, addArithmeticIdentifiers, addClauseIdentifier, addClauseIdentifiers, addClauseIdentifiers, addComparisonIdentifiers, addCompositeIdentifier, addCompoundIdentifier, addCompoundIdentifiers, addCompoundIdentifiers, addEntities, addEntities, addEnumConstant, addEnumConstants, addExpressionFactoryIdentifiers, addExpressionFactoryIdentifiers, addFunctionIdentifier, addFunctionIdentifiers, addFunctionIdentifiers, addFunctionIdentifiers, addIdentificationVariable, addIdentificationVariables, addIdentificationVariables, addIdentifier, addJoinIdentifiers, addLeftIdentificationVariables, addLogicalIdentifiers, addRangeIdentificationVariable, addResultVariables, addVirtualSpace, areArithmeticSymbolsAppendable, areComparisonSymbolsAppendable, areLogicalSymbolsAppendable, buildCollectionCompoundTypeFilter, buildCollectionExpressionVisitor, buildCollectionMappingFilter, buildConcatExpressionCollectionHelper, buildConditionalClauseCollectionHelper, buildConstrutorCollectionHelper, buildDeclarationVisitor, buildDefaultMappingCollector, buildDeleteClauseCollectionHelper, buildDeleteClauseStatementHelper, buildDifferentComparisonFilter, buildDoubleEncapsulatedCollectionHelper, buildEncapsulatedExpressionVisitor, buildEndingPositionFromInvalidExpression, buildEnumVisitor, buildFilteringMappingCollector, buildFollowingInvalidExpressionVisitor, buildGroupByClauseStatementHelper, buildHavingClauseStatementHelper, buildInvalidExpressionVisitor, buildJoinCollectionHelper, buildJPQLQueryBNFValidator, buildMappingCollector, buildMappingFilter, buildMappingFilter, buildMappingFilterBuilder, buildNonCollectionCompoundTypeFilter, buildNotExpressionVisitor, buildOrderByClauseCollectionHelper, buildPropertyMappingFilter, buildProposals, buildProposals, buildRangeVariableDeclarationVisitor, buildResultVariableVisitor, buildSelectClauseCollectionHelper, buildSelectClauseStatementHelper, buildSimpleGroupByClauseStatementHelper, buildSimpleHavingClauseStatementHelper, buildSimpleSelectClauseCollectionHelper, buildSimpleSelectClauseStatementHelper, buildSimpleWhereClauseSelectStatementHelper, buildSubqueryAppendableExpressionVisitor, buildSubqueryVisitor, buildTripleEncapsulatedCollectionHelper, buildUpdateClauseStatementHelper, buildUpdateItemCollectionHelper, buildVisitParentVisitor, buildWhenClauseConditionalClauseCollectionHelper, buildWhereClauseDeleteStatementHelper, buildWhereClauseSelectStatementHelper, buildWhereClauseUpdateStatementHelper, buildWithinInvalidExpressionVisitor, dispose, findRangeVariableDeclaration, getAcceptableType, getAppendableExpressionVisitor, getCollectionExpression, getCollectionExpressionVisitor, getConcatExpressionCollectionHelper, getConditionalClauseCollectionHelper, getConstructorCollectionHelper, getDeclarationVisitor, getDefaultMappingCollector, getDeleteClauseCollectionHelper, getDeleteClauseStatementHelper, getDoubleEncapsulatedCollectionHelper, getEncapsulatedExpressionVisitor, getEndingQueryPositionBuilder, getEnumVisitor, getExpressionFactory, getExpressionTypeVisitor, getFilter, getFollowingClausesVisitor, getFollowingInvalidExpressionVisitor, getFromClauseCollectionHelper, getFromClauseStatementHelper, getGroupByClauseCollectionHelper, getGroupByClauseStatementHelper, getHavingClauseStatementHelper, getHelper, getIdentifierRole, getIncompleteCollectionExpressionVisitor, getInvalidExpressionVisitor, getJoinCollectionHelper, getMappingCollectionFilter, getMappingFilterBuilder, getMappingPropertyFilter, getNotExpressionVisitor, getOrderByClauseCollectionHelper, getOrderByClauseStatementHelper, getQueryBNF, getRangeVariableDeclarationVisitor, getResultVariableVisitor, getSelectClauseCollectionHelper, getSelectClauseStatementHelper, getSimpleFromClauseStatementHelper, getSimpleGroupByClauseStatementHelper, getSimpleHavingClauseStatementHelper, getSimpleSelectClauseCollectionHelper, getSimpleSelectClauseStatementHelper, getSimpleWhereClauseSelectStatementHelper, getSubqueryAppendableExpressionVisitor, getSubqueryVisitor, getTripleEncapsulatedCollectionHelper, getUpdateClauseStatementHelper, getUpdateItemCollectionHelper, getVisitParentVisitor, getWhenClauseConditionalClauseCollectionHelper, getWhereClauseDeleteStatementHelper, getWhereClauseSelectStatementHelper, getWhereClauseUpdateStatementHelper, getWithinInvalidExpressionVisitor, hasClausesDefinedBetween, hasVirtualSpace, isAggregate, isAppendable, isAppendableToCollection, isClause, isClauseAppendable, isComplete, isCompoundable, isCompoundFunction, isDeclaration, isEncapsulated, isEnumAllowed, isFollowingInvalidExpression, isFunction, isInSubquery, isInvalidExpression, isLocked, isNotExpression, isPositionWithin, isPositionWithin, isSubqueryAppendable, isValid, isValid, isValid, isValid, isValid, isValidProposal, isValidVersion, isWithinInvalidExpression, registerHelper, removeVirtualSpace, toString, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitAggregateFunction, visitArithmeticExpression, visitCollectionExpression, visitEndingExpression, visitEnumConstant, visitInvalidExpression, visitLogicalExpression, visitPathExpression, visitPathExpression, visitSingleEncapsulatedExpression, visitSingleEncapsulatedExpression, visitStatement
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
-
Constructor Details
-
EclipseLinkContentAssistVisitor
Creates a newEclipseLinkContentAssistVisitor
.- Parameters:
queryContext
- The context used to query information about the query- Throws:
NullPointerException
- TheJPQLQueryContext
cannot benull
-
-
Method Details
-
buildAcceptableTypeVisitor
- Specified by:
buildAcceptableTypeVisitor
in classAbstractContentAssistVisitor
-
buildAppendableExpressionVisitor
protected EclipseLinkContentAssistVisitor.AppendableExpressionVisitor buildAppendableExpressionVisitor()- Overrides:
buildAppendableExpressionVisitor
in classAbstractContentAssistVisitor
-
buildEndingQueryPositionBuilder
protected EclipseLinkContentAssistVisitor.EndingQueryPositionBuilder buildEndingQueryPositionBuilder()- Overrides:
buildEndingQueryPositionBuilder
in classAbstractContentAssistVisitor
-
buildFollowingClausesVisitor
- Overrides:
buildFollowingClausesVisitor
in classAbstractContentAssistVisitor
-
buildFromClauseCollectionHelper
protected EclipseLinkContentAssistVisitor.FromClauseCollectionHelper buildFromClauseCollectionHelper()- Overrides:
buildFromClauseCollectionHelper
in classAbstractContentAssistVisitor
-
buildFromClauseStatementHelper
protected EclipseLinkContentAssistVisitor.FromClauseStatementHelper buildFromClauseStatementHelper()- Overrides:
buildFromClauseStatementHelper
in classAbstractContentAssistVisitor
-
buildGroupByClauseCollectionHelper
protected AbstractContentAssistVisitor.GroupByClauseCollectionHelper buildGroupByClauseCollectionHelper()- Overrides:
buildGroupByClauseCollectionHelper
in classAbstractContentAssistVisitor
-
buildIncompleteCollectionExpressionVisitor
protected EclipseLinkContentAssistVisitor.IncompleteCollectionExpressionVisitor buildIncompleteCollectionExpressionVisitor()- Overrides:
buildIncompleteCollectionExpressionVisitor
in classAbstractContentAssistVisitor
-
buildOrderByClauseStatementHelper
protected EclipseLinkContentAssistVisitor.OrderByClauseStatementHelper buildOrderByClauseStatementHelper()- Overrides:
buildOrderByClauseStatementHelper
in classAbstractContentAssistVisitor
-
buildSimpleFromClauseStatementHelper
protected EclipseLinkContentAssistVisitor.SimpleFromClauseStatementHelper buildSimpleFromClauseStatementHelper()- Overrides:
buildSimpleFromClauseStatementHelper
in classAbstractContentAssistVisitor
-
buildTableExpressionVisitor
-
buildUnionClauseStatementHelper
protected EclipseLinkContentAssistVisitor.UnionClauseStatementHelper buildUnionClauseStatementHelper() -
getEcliseLinkVersion
Returns the enum constant of the EclipseLink version specified in theJPQLQueryContext
.- Returns:
- The EclipseLink version specified or the default version (i.e. the version of the current release)
- Since:
- 2.5
-
getLatestGrammar
Description copied from class:AbstractContentAssistVisitor
Returns the latest supported JPQL grammar, which is required when checking the validity of a JPQL identifier. This is due to the fact that any JPQL identifiers defined in a more recent spec will be seen to be registered in version 1.0 of the spec. By returning the latest version, any JPQL identifiers should have a version registered.- Specified by:
getLatestGrammar
in classAbstractContentAssistVisitor
- Returns:
- The latest
JPQLGrammar
supported by the provider
-
getTableExpressionVisitor
-
getTableName
-
getUnionClauseStatementHelper
protected EclipseLinkContentAssistVisitor.UnionClauseStatementHelper getUnionClauseStatementHelper() -
initialize
protected void initialize()Description copied from class:AbstractContentAssistVisitor
Initializes this visitor.- Overrides:
initialize
in classAbstractContentAssistVisitor
-
isJoinFetchIdentifiable
protected boolean isJoinFetchIdentifiable()Description copied from class:AbstractContentAssistVisitor
Determines whether aJOIN FETCH
expression can be identified by with an identification variable or not.- Specified by:
isJoinFetchIdentifiable
in classAbstractContentAssistVisitor
- Returns:
true
if the expression can have an identification variable;false
otherwise
-
isTableExpression
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theAsOfClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theCastExpression
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theConnectByClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheConnectByClause
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theDatabaseType
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheDatabaseType
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theExtractExpression
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theHierarchicalQueryClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheHierarchicalQueryClause
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theOrderByItem
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractContentAssistVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theOrderSiblingsByClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theRegexpExpression
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theStartWithClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheStartWithClause
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theTableExpression
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theTableVariableDeclaration
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:EclipseLinkExpressionVisitor
Visits theUnionClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visitThirdPartyPathExpression
protected void visitThirdPartyPathExpression(AbstractPathExpression expression, String variableName) Description copied from class:AbstractContentAssistVisitor
Visits the givenAbstractPathExpression
and attempts to find valid proposals that is not provided by the default implementation. Subclasses can add additional proposals that is outside of the scope of generic JPA metadata.- Overrides:
visitThirdPartyPathExpression
in classAbstractContentAssistVisitor
- Parameters:
expression
- TheAbstractPathExpression
to inspectvariableName
- The beginning of the path expression
-