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.
- Version:
- 2.5.1
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Nested Class Summary
-
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
Constructors Constructor Description EclipseLinkContentAssistVisitor(JPQLQueryContext queryContext)
Creates a newEclipseLinkContentAssistVisitor
.
-
Method Summary
-
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, 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
-
-
-
-
Constructor Detail
-
EclipseLinkContentAssistVisitor
public EclipseLinkContentAssistVisitor(JPQLQueryContext queryContext)
Creates a newEclipseLinkContentAssistVisitor
.- Parameters:
queryContext
- The context used to query information about the query- Throws:
java.lang.NullPointerException
- TheJPQLQueryContext
cannot benull
-
-
Method Detail
-
buildAcceptableTypeVisitor
protected EclipseLinkContentAssistVisitor.AcceptableTypeVisitor 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
protected EclipseLinkContentAssistVisitor.FollowingClausesVisitor 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
protected EclipseLinkContentAssistVisitor.TableExpressionVisitor buildTableExpressionVisitor()
-
buildUnionClauseStatementHelper
protected EclipseLinkContentAssistVisitor.UnionClauseStatementHelper buildUnionClauseStatementHelper()
-
getEcliseLinkVersion
protected EclipseLinkVersion 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
protected JPQLGrammar getLatestGrammar()
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
protected EclipseLinkContentAssistVisitor.TableExpressionVisitor getTableExpressionVisitor()
-
getTableName
protected java.lang.String getTableName(java.lang.String variableName)
-
getUnionClauseStatementHelper
protected EclipseLinkContentAssistVisitor.UnionClauseStatementHelper getUnionClauseStatementHelper()
-
initialize
protected void initialize()
Initializes this visitor.- Overrides:
initialize
in classAbstractContentAssistVisitor
-
isJoinFetchIdentifiable
protected boolean isJoinFetchIdentifiable()
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
protected boolean isTableExpression(Expression expression)
-
visit
public void visit(AsOfClause expression)
Visits theAsOfClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(CastExpression expression)
Visits theCastExpression
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(ConnectByClause expression)
Visits theConnectByClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheConnectByClause
to visit
-
visit
public void visit(DatabaseType expression)
Visits theDatabaseType
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheDatabaseType
to visit
-
visit
public void visit(ExtractExpression expression)
Visits theExtractExpression
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(HierarchicalQueryClause expression)
Visits theHierarchicalQueryClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheHierarchicalQueryClause
to visit
-
visit
public void visit(OrderByItem expression)
Visits theOrderByItem
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractContentAssistVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(OrderSiblingsByClause expression)
Visits theOrderSiblingsByClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(RegexpExpression expression)
Visits theRegexpExpression
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(StartWithClause expression)
Visits theStartWithClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheStartWithClause
to visit
-
visit
public void visit(TableExpression expression)
Visits theTableExpression
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(TableVariableDeclaration expression)
Visits theTableVariableDeclaration
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(UnionClause expression)
Visits theUnionClause
expression.- Specified by:
visit
in interfaceEclipseLinkExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visitThirdPartyPathExpression
protected void visitThirdPartyPathExpression(AbstractPathExpression expression, java.lang.String variableName)
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
-
-