EclipseLink 2.5.0, build 'v20130312-9664d23' API Reference

org.eclipse.persistence.jpa.jpql.tools
Class AbstractContentAssistVisitor

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
      extended by org.eclipse.persistence.jpa.jpql.tools.AbstractContentAssistVisitor
All Implemented Interfaces:
ExpressionVisitor
Direct Known Subclasses:
DefaultContentAssistVisitor, EclipseLinkContentAssistVisitor

public abstract class AbstractContentAssistVisitor
extends AnonymousExpressionVisitor

The visitor provides support for finding the possible proposals within a JPQL query at a certain position.

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
Author:
Pascal Filion
Since:
2.4

Nested Class Summary
protected  class AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper
           
protected  class AbstractContentAssistVisitor.AbstractFromClauseStatementHelper<T extends AbstractSelectStatement>
           
protected  class AbstractContentAssistVisitor.AbstractGroupByClauseStatementHelper<T extends AbstractSelectStatement>
           
protected  class AbstractContentAssistVisitor.AbstractHavingClauseStatementHelper<T extends AbstractSelectStatement>
           
protected  class AbstractContentAssistVisitor.AbstractSelectClauseCollectionHelper<T extends AbstractSelectClause>
           
protected  class AbstractContentAssistVisitor.AbstractSelectClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.AbstractWhereClauseSelectStatementHelper<T extends AbstractSelectStatement>
           
protected  class AbstractContentAssistVisitor.AcceptableTypeVisitor
          This visitor retrieves the permitted type from the path expression's parent.
protected  class AbstractContentAssistVisitor.AppendableExpressionVisitor
          This visitor scans the visited Expression and determines if a JPQL identifier can be added ("appended") when the position of the cursor is at the end of the expression.
protected static class AbstractContentAssistVisitor.AppendableType
          This is used to determine how AbstractContentAssistVisitor.AppendableExpressionVisitor should perform the check.
protected static interface AbstractContentAssistVisitor.CollectionExpressionHelper<T extends Expression>
          This helper is used to determine how to add proposals within a collection of expressions.
protected static class AbstractContentAssistVisitor.CollectionExpressionVisitor
          This visitor retrieves the CollectionExpression if it is visited.
protected  class AbstractContentAssistVisitor.CollectionMappingFilter
           
protected  class AbstractContentAssistVisitor.CompletenessVisitor
          This visitor is meant to be subclassed and to complete its behavior, which is basically to determine if the Expression is complete or not.
protected  class AbstractContentAssistVisitor.CompoundExpressionHelper
          This helper is responsible to traverse the parsed tree and to determine if JPQL identifiers with a compound role can be appended after an Expression, which is based on the location of the cursor.
protected static interface AbstractContentAssistVisitor.CompoundTypeFilter
           
protected  class AbstractContentAssistVisitor.ConcatExpressionCollectionHelper
           
protected  class AbstractContentAssistVisitor.ConstrutorCollectionHelper
           
protected  class AbstractContentAssistVisitor.DeclarationVisitor
           
protected  class AbstractContentAssistVisitor.DefaultMappingCollector
          The default implementation of AbstractContentAssistVisitor.DefaultMappingCollector, which simply returns an empty collection.
protected  class AbstractContentAssistVisitor.DeleteClauseCollectionHelper
           
protected  class AbstractContentAssistVisitor.DeleteClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.DoubleEncapsulatedCollectionHelper
           
protected  class AbstractContentAssistVisitor.EncapsulatedExpressionVisitor
           
protected  class AbstractContentAssistVisitor.EndingQueryPositionBuilder
          This builder populates a QueryPosition by traversing the valid portion of the JPQL query.
protected  class AbstractContentAssistVisitor.EnumVisitor
          This visitor determines whether a path expression can be resolved as a fully qualified enum type and an enum constant.
protected  class AbstractContentAssistVisitor.FilteringMappingCollector
          This AbstractContentAssistVisitor.DefaultMappingCollector returns the possible mappings (non-collection type or collection type) from a managed type.
protected  class AbstractContentAssistVisitor.FollowingClausesVisitor
           
protected  class AbstractContentAssistVisitor.FollowingInvalidExpressionVisitor
           
protected  class AbstractContentAssistVisitor.FromClauseCollectionHelper
           
protected  class AbstractContentAssistVisitor.FromClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.GroupByClauseCollectionHelper
           
protected  class AbstractContentAssistVisitor.GroupByClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.HavingClauseStatementHelper
           
protected static class AbstractContentAssistVisitor.IdentificationVariableType
          The various ways of retrieving identification variables from the declaration expression.
protected  class AbstractContentAssistVisitor.IncompleteCollectionExpressionVisitor
          This visitor is used when a clause or a compound expression was parsed with a collection of expressions representing an invalid fragment.
protected static class AbstractContentAssistVisitor.InvalidExpressionVisitor
          This visitor determines if the visited Expression is one of the two that represents an invalid expression.
protected  class AbstractContentAssistVisitor.JoinCollectionHelper
           
protected static interface AbstractContentAssistVisitor.MappingCollector
          A collector is responsible to retrieve the possible proposals by using the mappings that can complete a path expression.
protected  class AbstractContentAssistVisitor.MappingFilterBuilder
          This visitor is responsible to create the right Filter based on the type of the Expression.
protected  class AbstractContentAssistVisitor.MappingTypeFilter
          This Filter is responsible to filter out the mappings that can't have their type assignable to the one passed in.
protected  class AbstractContentAssistVisitor.NotExpressionVisitor
           
protected static class AbstractContentAssistVisitor.NullExpressionVisitor
          This visitor checks to see if the visited expression is NullExpression.
protected  class AbstractContentAssistVisitor.OrderByClauseCollectionHelper
           
protected  class AbstractContentAssistVisitor.OrderByClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.PropertyMappingFilter
           
protected  class AbstractContentAssistVisitor.RangeVariableDeclarationVisitor
           
protected  class AbstractContentAssistVisitor.ResultVariableVisitor
           
protected  class AbstractContentAssistVisitor.SelectClauseCollectionHelper
           
protected  class AbstractContentAssistVisitor.SelectClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.SimpleFromClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.SimpleGroupByClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.SimpleHavingClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.SimpleSelectClauseCollectionHelper
           
protected  class AbstractContentAssistVisitor.SimpleSelectClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.SimpleWhereClauseSelectStatementHelper
           
protected static interface AbstractContentAssistVisitor.StatementHelper<T extends Expression>
          This helper helps to add JPQL identifiers for the clauses that make up a query statement and also chains the clauses within the query.
protected  class AbstractContentAssistVisitor.SubqueryAppendableExpressionVisitor
           
protected  class AbstractContentAssistVisitor.SubqueryVisitor
          This visitor determines if an Expression is in a subquery.
protected  class AbstractContentAssistVisitor.TrailingCompletenessVisitor
           
protected  class AbstractContentAssistVisitor.TripleEncapsulatedCollectionHelper
           
protected  class AbstractContentAssistVisitor.UpdateClauseStatementHelper
           
protected  class AbstractContentAssistVisitor.UpdateItemCollectionHelper
           
protected  class AbstractContentAssistVisitor.VisitParentVisitor
          This visitor is meant to adjust the corrections stack when traversing an Expression in order to increase the list of valid proposals.
protected  class AbstractContentAssistVisitor.WhereClauseDeleteStatementHelper
           
protected  class AbstractContentAssistVisitor.WhereClauseSelectStatementHelper
           
protected  class AbstractContentAssistVisitor.WhereClauseUpdateStatementHelper
           
protected  class AbstractContentAssistVisitor.WithinInvalidExpressionVisitor
           
 
Field Summary
protected  java.util.Map<java.lang.String,AbstractContentAssistVisitor.CompoundTypeFilter> compoundTypeFilters
           
protected  java.util.Stack<java.lang.Integer> corrections
          This is used to change the position of the cursor in order to add possible proposals
protected  java.util.Map<java.lang.Class<?>,java.lang.Object> helpers
          The cached helpers that are used by this visitor to add valid content assist proposals.
protected  java.util.Stack<java.lang.Integer> indexWithinCollection
          Used to determine if the cursor is an expression contained in a collection, if not, then this value is set to -1.
protected  java.util.Stack<Expression> lockedExpressions
          Used to prevent and infinite recursion when one of the visit method is virtually asking a child expression to be visited.
protected  DefaultContentAssistProposals proposals
          The set of possible proposals gathered based on the position in the query.
protected  JPQLQueryContext queryContext
          The context used to query information about the JPQL query.
protected  QueryPosition queryPosition
          Contains the position of the cursor within the parsed Expression from the root node up to the deepest leaf node.
protected static int SPACE_LENGTH
          A constant for the length of a whitespace, which is 1.
protected  java.util.Stack<java.lang.Integer> virtualSpaces
          A virtual space is used to move the position of the cursor by adding an extra space in order to find some proposals within an expression.
protected  java.lang.String word
          The current word, which was retrieved from the JPQL query based on the position of the cursor.
protected  WordParser wordParser
          This is used to retrieve words from the actual JPQL query.
 
Constructor Summary
protected AbstractContentAssistVisitor(JPQLQueryContext queryContext)
          Creates a new AbstractContentAssistVisitor.
 
Method Summary
protected  void addAdditionalFunctions(AbstractExpression expression)
           
protected  void addAggregate(java.lang.String identifier)
          Adds the given JPQL identifier as a valid proposal if its role is IdentifierRole.AGGREGATE and the beginning starts with the current word.
protected  void addAllAggregates(JPQLQueryBNF queryBNF)
          Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.AGGREGATE and the beginning starts with the current word.
protected  void addAllAggregates(java.lang.String queryBNFId)
          Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.AGGREGATE and the beginning starts with the current word.
protected  void addAllArithmeticIdentifiers()
           
protected  void addAllClauses(JPQLQueryBNF queryBNF)
          Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.CLAUSE and the beginning starts with the current word.
protected  void addAllClauses(java.lang.String queryBNF)
          Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.CLAUSE and the beginning starts with the current word.
protected  void addAllComparisonIdentifiers()
           
protected  void addAllCompounds(JPQLQueryBNF queryBNF, Expression expression, boolean hasIs, boolean hasNot)
          Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.COMPOUND_FUNCTION and the beginning starts with the current word.
protected  void addAllCompounds(java.lang.String queryBNFId, Expression expression, boolean hasIs, boolean hasNot)
          Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.COMPOUND_FUNCTION and the beginning starts with the current word.
protected  void addAllEnumConstants(IType enumType, java.lang.String word)
          Adds the constants of the given enum type as valid proposals if the beginning starts with the given word.
protected  void addAllExpressionFactoryIdentifiers(ExpressionFactory expressionFactory)
           
protected  void addAllExpressionFactoryIdentifiers(java.lang.String expressionFactoryId)
           
protected  void addAllFunctions(JPQLQueryBNF queryBNF)
          Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.FUNCTION and the beginning starts with the current word.
protected  void addAllFunctions(java.lang.String queryBNFId)
          Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.FUNCTION and the beginning starts with the current word.
protected  void addAllIdentificationVariables()
          Adds all the identification variables defined in the current query's FROM clause.
protected  void addAllIdentifiers(JPQLQueryBNF queryBNF)
          Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if the beginning starts with the current word.
protected  void addAllIdentifiers(java.lang.String queryBNFId)
          Adds the unique identifier of the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if the beginning starts with the current word.
protected  void addAllLogicalIdentifiers()
          Adds the logical identifiers, which are AND and OR.
protected  void addAllResultVariables()
          Adds the result variables defined in the SELECT clause as valid proposals.
protected  void addClause(java.lang.String identifier)
          Adds the given JPQL identifier as a valid proposal if its role is IdentifierRole.CLAUSE and the beginning starts with the current word.
protected  void addCompositeIdentifier(java.lang.String identifier)
           
protected  void addCompound(java.lang.String identifier, Expression expression, boolean hasIs, boolean hasNot)
          Adds the given JPQL identifier as a valid proposal if its role is IdentifierRole.COMPOUND_FUNCTION and the beginning starts with the current word.
protected  void addEntities()
          Adds the abstract schema types as possible content assist proposals but will be filtered using the current word.
protected  void addEntities(IType type)
          Adds the abstract schema types as possible content assist proposals but will be filtered using the current word and the entity's type will have to match the one from the given IType.
protected  void addEnumConstant(IType enumType, java.lang.String enumConstant)
          Adds the constants of the given enum constant as a valid proposal.
protected  void addFunction(java.lang.String identifier)
          Adds the given JPQL identifier as a valid proposal if its role is IdentifierRole.FUNCTION and the beginning starts with the current word.
protected  void addIdentificationVariable(java.lang.String identificationVariable)
          Adds the given identification variable as a valid proposal.
protected  void addIdentificationVariables(AbstractContentAssistVisitor.IdentificationVariableType type, Expression expression)
          Adds the possible identifier variables as valid proposals but filter them based on the given type.
protected  void addIdentifier(java.lang.String identifier)
          Adds the given identifier as a proposal if it passes the checks.
protected  void addIdentifier(java.lang.String identifier, java.lang.String word)
          Adds the given proposal as a proposal if it passes the checks.
protected  void addJoinIdentifiers()
          Adds the join specification identifiers as proposals without validation.
protected  void addLeftIdentificationVariables(Expression expression)
          Adds the identification variables defined in the current query's FROM clause that are declared before the given Expression.
protected  boolean addMultipleWordsIdentifier(java.lang.String identifier, int position, java.lang.String partialEnding, int endIndex)
          Adds the given identifier as a proposal.
protected  void addRangeIdentificationVariable(java.lang.String identificationVariable)
          Adds the given identification variable as a proposal if it passes the checks.
protected  void addVirtualSpace()
          Adds a virtual space on the stack.
protected  boolean areArithmeticSymbolsAppendable(Expression expression)
          Determines whether
protected  boolean areComparisonSymbolsAppendable(Expression expression)
          Determines
protected  boolean areLogicalSymbolsAppendable(Expression expression)
          Determines whether
protected  AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper buildAbstractConditionalClauseCollectionHelper()
           
protected abstract  AbstractContentAssistVisitor.AcceptableTypeVisitor buildAcceptableTypeVisitor()
           
protected  AbstractContentAssistVisitor.AppendableExpressionVisitor buildAppendableExpressionVisitor()
           
protected  AbstractContentAssistVisitor.CollectionExpressionVisitor buildCollectionExpressionVisitor()
          Creates a visitor that collects the CollectionExpression if it's been visited.
protected  AbstractContentAssistVisitor.CollectionMappingFilter buildCollectionMappingFilter()
           
protected  AbstractContentAssistVisitor.CompoundExpressionHelper buildCompoundExpressionHelper()
           
protected  AbstractContentAssistVisitor.ConcatExpressionCollectionHelper buildConcatExpressionCollectionHelper()
           
protected  AbstractContentAssistVisitor.ConstrutorCollectionHelper buildConstrutorCollectionHelper()
           
protected  AbstractContentAssistVisitor.DeclarationVisitor buildDeclarationVisitor()
           
protected  AbstractContentAssistVisitor.DefaultMappingCollector buildDefaultMappingCollector()
           
protected  AbstractContentAssistVisitor.DeleteClauseCollectionHelper buildDeleteClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.DeleteClauseStatementHelper buildDeleteClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.DoubleEncapsulatedCollectionHelper buildDoubleEncapsulatedCollectionHelper()
           
protected  AbstractContentAssistVisitor.CompoundTypeFilter buildEmptyCompoundTypeFilter()
           
protected  AbstractContentAssistVisitor.EncapsulatedExpressionVisitor buildEncapsulatedExpressionVisitor()
           
protected  QueryPosition buildEndingPositionFromInvalidExpression(Expression expression, boolean visitExpressionOnly, boolean[] virtualSpace)
           
protected  AbstractContentAssistVisitor.EndingQueryPositionBuilder buildEndingQueryPositionBuilder()
           
protected  AbstractContentAssistVisitor.EnumVisitor buildEnumVisitor()
           
protected  AbstractContentAssistVisitor.FilteringMappingCollector buildFilteringMappingCollector(AbstractPathExpression expression, Resolver resolver, Filter<IMapping> filter, java.lang.String pattern)
           
protected  AbstractContentAssistVisitor.FollowingClausesVisitor buildFollowingClausesVisitor()
           
protected  AbstractContentAssistVisitor.FollowingInvalidExpressionVisitor buildFollowingInvalidExpressionVisitor()
           
protected  AbstractContentAssistVisitor.FromClauseCollectionHelper buildFromClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.FromClauseStatementHelper buildFromClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.GroupByClauseCollectionHelper buildGroupByClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.GroupByClauseStatementHelper buildGroupByClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.HavingClauseStatementHelper buildHavingClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.IncompleteCollectionExpressionVisitor buildIncompleteCollectionExpressionVisitor()
           
protected  AbstractContentAssistVisitor.InvalidExpressionVisitor buildInvalidExpressionVisitor()
           
protected  AbstractContentAssistVisitor.JoinCollectionHelper buildJoinCollectionHelper()
           
protected  AbstractValidator.JPQLQueryBNFValidator buildJPQLQueryBNFValidator(JPQLQueryBNF queryBNF)
          Returns the AbstractValidator.JPQLQueryBNFValidator that can be used to validate an Expression by making sure its BNF is part of the given BNF.
protected  AbstractValidator.JPQLQueryBNFValidator buildJPQLQueryBNFValidator(java.lang.String queryBNFId)
          Returns the AbstractValidator.JPQLQueryBNFValidator that can be used to validate an Expression by making sure its BNF is part of the given BNF.
protected  AbstractContentAssistVisitor.MappingCollector buildMappingCollector(AbstractPathExpression expression, Resolver resolver, Filter<IMapping> filter)
           
protected  Filter<IMapping> buildMappingFilter(AbstractPathExpression expression, Filter<IMapping> filter)
           
protected  Filter<IMapping> buildMappingFilter(Expression expression)
           
protected  AbstractContentAssistVisitor.MappingFilterBuilder buildMappingFilterBuilder()
           
protected  AbstractContentAssistVisitor.NotExpressionVisitor buildNotExpressionVisitor()
           
protected  AbstractContentAssistVisitor.NullExpressionVisitor buildNullExpressionVisitor()
          Creates a visitor that collects the NullExpression if it's been visited.
protected  AbstractContentAssistVisitor.OrderByClauseCollectionHelper buildOrderByClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.OrderByClauseStatementHelper buildOrderByClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.PropertyMappingFilter buildPropertyMappingFilter()
           
 ContentAssistProposals buildProposals(int position)
          Prepares this visitor by prepopulating it with the necessary data that is required to properly gather the list of proposals based on the given caret position.
 ContentAssistProposals buildProposals(int position, ContentAssistExtension extension)
          Prepares this visitor by prepopulating it with the necessary data that is required to properly gather the list of proposals based on the given caret position.
protected  AbstractContentAssistVisitor.RangeVariableDeclarationVisitor buildRangeVariableDeclarationVisitor()
           
protected  AbstractContentAssistVisitor.ResultVariableVisitor buildResultVariableVisitor()
           
protected  AbstractContentAssistVisitor.SelectClauseCollectionHelper buildSelectClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.SelectClauseStatementHelper buildSelectClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleFromClauseStatementHelper buildSimpleFromClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleGroupByClauseStatementHelper buildSimpleGroupByClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleHavingClauseStatementHelper buildSimpleHavingClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleSelectClauseCollectionHelper buildSimpleSelectClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.SimpleSelectClauseStatementHelper buildSimpleSelectClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleWhereClauseSelectStatementHelper buildSimpleWhereClauseSelectStatementHelper()
           
protected  AbstractContentAssistVisitor.SubqueryAppendableExpressionVisitor buildSubqueryAppendableExpressionVisitor()
           
protected  AbstractContentAssistVisitor.SubqueryVisitor buildSubqueryVisitor()
           
protected  AbstractContentAssistVisitor.TrailingCompletenessVisitor buildTrailingCompleteness()
           
protected  AbstractContentAssistVisitor.TripleEncapsulatedCollectionHelper buildTripleEncapsulatedCollectionHelper()
           
protected  AbstractContentAssistVisitor.UpdateClauseStatementHelper buildUpdateClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.UpdateItemCollectionHelper buildUpdateItemCollectionHelper()
           
protected  AbstractContentAssistVisitor.VisitParentVisitor buildVisitParentVisitor()
           
protected  AbstractContentAssistVisitor.WhereClauseDeleteStatementHelper buildWhereClauseDeleteStatementHelper()
           
protected  AbstractContentAssistVisitor.WhereClauseSelectStatementHelper buildWhereClauseSelectStatementHelper()
           
protected  AbstractContentAssistVisitor.WhereClauseUpdateStatementHelper buildWhereClauseUpdateStatementHelper()
           
protected  AbstractContentAssistVisitor.WithinInvalidExpressionVisitor buildWithinInvalidExpressionVisitor()
           
 void dispose()
          Disposes this visitor.
protected  java.lang.Iterable<IEntity> entities()
          Returns the collection of possible abstract schema types.
protected  int findIndex(CollectionExpression expression)
           
protected  RangeVariableDeclaration findRangeVariableDeclaration(UpdateClause expression)
           
protected  AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper getAbstractConditionalClauseCollectionHelper()
           
protected  IType getAcceptableType(Expression expression)
          Determines the root IType that any type should be assignable.
protected  AbstractContentAssistVisitor.AppendableExpressionVisitor getAppendableExpressionVisitor()
           
protected  CollectionExpression getCollectionExpression(Expression expression)
          Casts the given Expression to a CollectionExpression if it is actually an object of that type.
protected  AbstractContentAssistVisitor.CollectionExpressionVisitor getCollectionExpressionVisitor()
          Returns the visitor that collects the CollectionExpression if it's been visited.
protected  AbstractContentAssistVisitor.CompletenessVisitor getCompletenessVisitor()
           
protected  AbstractContentAssistVisitor.CompoundExpressionHelper getCompoundExpressionHelper()
           
protected  AbstractContentAssistVisitor.ConcatExpressionCollectionHelper getConcatExpressionCollectionHelper()
           
protected  AbstractContentAssistVisitor.ConstrutorCollectionHelper getConstructorCollectionHelper()
           
protected  java.util.Stack<java.lang.Integer> getCorrections()
          Returns
protected  AbstractContentAssistVisitor.CompoundTypeFilter getCoumpoundTypeFilter(java.lang.String identifier)
           
protected  AbstractContentAssistVisitor.DeclarationVisitor getDeclarationVisitor()
           
protected  AbstractContentAssistVisitor.MappingCollector getDefaultMappingCollector()
           
protected  AbstractContentAssistVisitor.DeleteClauseCollectionHelper getDeleteClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.DeleteClauseStatementHelper getDeleteClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.DoubleEncapsulatedCollectionHelper getDoubleEncapsulatedCollectionHelper()
           
protected  IEmbeddable getEmbeddable(IType type)
          Retrieves the IEmbeddable for the given IType if one exists.
protected  AbstractContentAssistVisitor.EncapsulatedExpressionVisitor getEncapsulatedExpressionVisitor()
           
protected  AbstractContentAssistVisitor.EndingQueryPositionBuilder getEndingQueryPositionBuilder()
           
protected  IEntity getEntity(IType type)
          Retrieves the IEntity for the given IType if one exists.
protected  IEntity getEntityNamed(java.lang.String entityName)
          Retrieves the entity with the given abstract schema name, which can also be the entity class name.
protected  AbstractContentAssistVisitor.EnumVisitor getEnumVisitor()
           
protected  ExpressionFactory getExpressionFactory(java.lang.String expressionFactoryId)
          Retrieves the registered ExpressionFactory that was registered for the given unique identifier.
protected  ExpressionRegistry getExpressionRegistry()
          Returns the registry containing the JPQLQueryBNFs and the ExpressionFactories that are used to properly parse a JPQL query.
protected  AbstractContentAssistVisitor.AcceptableTypeVisitor getExpressionTypeVisitor()
           
protected  AbstractContentAssistVisitor.FollowingClausesVisitor getFollowingClausesVisitor()
           
protected  AbstractContentAssistVisitor.FollowingInvalidExpressionVisitor getFollowingInvalidExpressionVisitor()
           
protected  AbstractContentAssistVisitor.FromClauseCollectionHelper getFromClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.FromClauseStatementHelper getFromClauseStatementHelper()
           
protected  JPQLGrammar getGrammar()
          Returns the JPQL grammar that will be used to define how to parse a JPQL query.
protected  AbstractContentAssistVisitor.GroupByClauseCollectionHelper getGroupByClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.GroupByClauseStatementHelper getGroupByClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.HavingClauseStatementHelper getHavingClauseStatementHelper()
           
protected
<T> T
getHelper(java.lang.Class<T> helperClass)
          Retrieves the helper associated with the given helper class.
protected  IdentifierRole getIdentifierRole(java.lang.String identifier)
          Retrieves the role of the given identifier.
protected  JPAVersion getIdentifierVersion(java.lang.String identifier)
          Retrieves the JPA version in which the identifier was first introduced.
protected  AbstractContentAssistVisitor.CompletenessVisitor getIncompleteCollectionExpressionVisitor()
           
protected  AbstractContentAssistVisitor.InvalidExpressionVisitor getInvalidExpressionVisitor()
           
protected  AbstractContentAssistVisitor.JoinCollectionHelper getJoinCollectionHelper()
           
protected  JPAVersion getJPAVersion()
          Returns the version of the Java Persistence this entity for which it was defined.
protected  JPQLExpression getJPQLExpression()
          Returns the parsed tree representation of the JPQL query.
protected  IManagedType getManagedType(IType type)
          Retrieves the entity for the given type.
protected  IMappedSuperclass getMappedSuperclass(IType type)
          Retrieves the IMappedSuperclass for the given IType if one exists.
protected  IMapping getMapping(Expression expression)
          Returns the IMapping for the field represented by the given Expression.
protected  Filter<IMapping> getMappingCollectionFilter()
           
protected  AbstractContentAssistVisitor.MappingFilterBuilder getMappingFilterBuilder()
           
protected  Filter<IMapping> getMappingPropertyFilter()
           
protected  AbstractContentAssistVisitor.NotExpressionVisitor getNotExpressionVisitor()
           
protected  AbstractContentAssistVisitor.NullExpressionVisitor getNullExpressionVisitor()
          Returns the visitor that collects the NullExpression if it's been visited.
protected  AbstractContentAssistVisitor.OrderByClauseCollectionHelper getOrderByClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.OrderByClauseStatementHelper getOrderByClauseStatementHelper()
           
protected  int getPosition(Expression expression)
          Returns the position of the Expression within the parsed tree representation of the JPQL query.
 DefaultContentAssistProposals getProposals()
          Returns the object that contains the valid proposals based on the position of the cursor within the JPQL query.
protected  IManagedTypeProvider getProvider()
          Retrieves the provider of managed types.
protected  java.lang.String getProviderVersion()
          Returns the version of the persistence provider.
protected  IQuery getQuery()
          Returns the external form of the JPQL query.
protected  JPQLQueryBNF getQueryBNF(java.lang.String queryBNFId)
          Retrieves the BNF object that was registered for the given unique identifier.
protected  JPQLQueryContext getQueryContext()
          Returns the JPQLQueryContext that is used by this visitor.
protected  java.lang.String getQueryExpression()
          Returns the string representation of the JPQL query.
protected  AbstractContentAssistVisitor.RangeVariableDeclarationVisitor getRangeVariableDeclarationVisitor()
           
protected  Resolver getResolver(Expression expression)
          Creates or retrieved the cached Resolver for the given Expression.
protected  AbstractContentAssistVisitor.ResultVariableVisitor getResultVariableVisitor()
           
protected  AbstractContentAssistVisitor.SelectClauseCollectionHelper getSelectClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.SelectClauseStatementHelper getSelectClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleFromClauseStatementHelper getSimpleFromClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleGroupByClauseStatementHelper getSimpleGroupByClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleHavingClauseStatementHelper getSimpleHavingClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleSelectClauseCollectionHelper getSimpleSelectClauseCollectionHelper()
           
protected  AbstractContentAssistVisitor.SimpleSelectClauseStatementHelper getSimpleSelectClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.SimpleWhereClauseSelectStatementHelper getSimpleWhereClauseSelectStatementHelper()
           
protected  AbstractContentAssistVisitor.SubqueryAppendableExpressionVisitor getSubqueryAppendableExpressionVisitor()
           
protected  AbstractContentAssistVisitor.SubqueryVisitor getSubqueryVisitor()
           
protected  AbstractContentAssistVisitor.TripleEncapsulatedCollectionHelper getTripleEncapsulatedCollectionHelper()
           
protected  IType getType(java.lang.Class<?> type)
          Retrieves the external type for the given Java type.
protected  IType getType(Expression expression)
          Returns the IType of the given Expression.
protected  IType getType(java.lang.String typeName)
          Retrieves the external class for the given fully qualified class name.
protected  ITypeDeclaration getTypeDeclaration(Expression expression)
          Returns the ITypeDeclaration of the field handled by this Resolver.
protected  TypeHelper getTypeHelper()
          Returns a helper that gives access to the most common types.
protected  ITypeRepository getTypeRepository()
          Returns the type repository for the application.
protected  AbstractContentAssistVisitor.UpdateClauseStatementHelper getUpdateClauseStatementHelper()
           
protected  AbstractContentAssistVisitor.UpdateItemCollectionHelper getUpdateItemCollectionHelper()
           
protected  AbstractContentAssistVisitor.WhereClauseDeleteStatementHelper getWhereClauseDeleteStatementHelper()
           
protected  AbstractContentAssistVisitor.WhereClauseSelectStatementHelper getWhereClauseSelectStatementHelper()
           
protected  AbstractContentAssistVisitor.WhereClauseUpdateStatementHelper getWhereClauseUpdateStatementHelper()
           
protected  AbstractContentAssistVisitor.WithinInvalidExpressionVisitor getWithinInvalidExpressionVisitor()
           
protected  boolean hasClausesDefinedBetween(Expression expression, java.lang.String afterIdentifier, java.lang.String beforeIdentifier)
           
protected  boolean hasVirtualSpace()
          Determines whether there is a virtual space to be considered or not.
protected  void initialize()
          Initializes this visitor.
protected  int invalidExpressionPosition(CollectionExpression expression, int positionInCollection)
           
protected  boolean isAggregate(java.lang.String identifier)
          Determines whether the given JPQL identifier used in an aggregate expression; for instance AND.
protected  boolean isAppendable(Expression expression, AbstractContentAssistVisitor.AppendableType appendableType)
          Determines whether the given Expression
protected  boolean isAppendableToCollection(Expression expression)
          Determines whether
protected  boolean isClause(java.lang.String identifier)
          Determines whether the given JPQL identifier used in a clause; for instance SELECT.
protected  boolean isClauseAppendable(Expression expression)
          Determines whether
protected  boolean isComplete(Expression expression)
          Determines whether the given Expression is complete or not.
protected  boolean isCompoundable(Expression expression)
          Determines whether
protected  boolean isCompoundFunction(java.lang.String identifier)
          Determines whether the given JPQL identifier used in a compound expression; an example would be BETWEEN or MEMBER.
protected  boolean isDeclaration(AbstractPathExpression expression)
           
protected  boolean isEncapsulated(AbstractExpression expression)
           
protected  boolean isEnumAllowed(AbstractPathExpression expression)
           
protected  boolean isFollowingInvalidExpression(Expression expression)
           
protected  boolean isFunction(java.lang.String identifier)
          Determines whether the given JPQL identifier is a function, an example would be AVG.
protected  boolean isGroupByComplete(Expression expression)
           
protected  boolean isInSubquery(Expression expression)
          Determines whether the given Expression is in a subquery or in the top-level query.
protected  boolean isInvalidExpression(Expression expression)
           
protected abstract  boolean isJoinFetchIdentifiable()
          Determines whether a JOIN FETCH expression can be identified by with an identification variable or not.
protected  boolean isLocked(Expression expression)
          Determines whether the given Expression has been set has the lock to prevent an infinite recursion.
protected  boolean isNotExpression(Expression expression)
           
protected  boolean isNull(Expression expression)
          Determines whether the given Expression is the NullExpression.
protected  boolean isPositionWithin(int position, int offset, java.lang.String word)
          Determines whether the given position is within the given word.
protected  boolean isPositionWithin(int position, java.lang.String word)
          Determines whether the given position is within the given word.
protected  boolean isResultVariable(Expression expression)
           
protected  boolean isSubqueryAppendable(Expression expression)
          Determines whether
protected  boolean isValid(Expression expression, JPQLQueryBNF queryBNF)
          Determines whether the given Expression part is an expression of the given query BNF.
protected  boolean isValid(Expression expression, java.lang.String queryBNFId)
          Determines whether the given Expression part is an expression of the given query BNF.
protected  boolean isValid(JPQLQueryBNF parentQueryBNF, JPQLQueryBNF queryBNF)
          Determines whether the given Expression part is an expression of the given query BNF.
protected  boolean isValid(JPQLQueryBNF parentQueryBNF, JPQLQueryBNF queryBNF, boolean bypassCompound)
          Determines whether the given Expression part is an expression of the given query BNF.
protected  boolean isValid(JPQLQueryBNF parentQueryBNF, java.lang.String queryBNFId)
          Determines whether the given Expression part is an expression of the given query BNF.
protected  boolean isValid(JPQLQueryBNF parentQueryBNF, java.lang.String queryBNFId, boolean bypassCompound)
          Determines whether the given Expression part is an expression of the given query BNF.
protected  boolean isValidFragment(java.lang.String identifier, java.lang.String text)
           
protected  boolean isValidProposal(java.lang.String proposal, java.lang.String word)
          Determines whether the given proposal is a valid, which is based on the content of the given word.
protected  boolean isValidVersion(java.lang.String identifier)
          Determines whether the given JPQL identifier can be a valid proposal, i.e. if it's part of the grammar of the JPA version that was used to parse the JPQL query.
protected  boolean isWithinInvalidExpression(Expression expression)
           
 void prepare(QueryPosition queryPosition, ContentAssistExtension extension)
          Prepares this visitor by pre-populating it with the necessary data that is required to properly gather the list of proposals based on the caret position.
protected
<T> void
registerHelper(java.lang.Class<T> helperClass, T helper)
          Registers the given helper associated with the given helper class.
protected  void removeVirtualSpace()
          Removes the last virtual space from the stack.
 java.lang.String toString()
          
protected  int virtualSpace()
          Returns the virtual space (which is equal to 1 character), if one was added to the stack or 0 if none is present.
 void visit(AbsExpression expression)
          Visits the AbsExpression expression.
 void visit(AbstractSchemaName expression)
          Visits the AbstractSchemaName expression.
 void visit(AdditionExpression expression)
          Visits the AdditionExpression expression.
 void visit(AllOrAnyExpression expression)
          Visits the AllOrAnyExpression expression.
 void visit(AndExpression expression)
          Visits the AndExpression expression.
 void visit(ArithmeticFactor expression)
          Visits the ArithmeticFactor expression.
 void visit(AvgFunction expression)
          Visits the AvgFunction expression.
 void visit(BadExpression expression)
          Visits the BadExpression expression.
 void visit(BetweenExpression expression)
          Visits the BetweenExpression expression.
 void visit(CaseExpression expression)
          Visits the CaseExpression expression.
 void visit(CoalesceExpression expression)
          Visits the CoalesceExpression expression.
 void visit(CollectionExpression expression)
          Visits the CollectionExpression expression.
 void visit(CollectionMemberDeclaration expression)
          Visits the CollectionMemberDeclaration expression.
 void visit(CollectionMemberExpression expression)
          Visits the CollectionMemberExpression expression.
 void visit(CollectionValuedPathExpression expression)
          Visits the CollectionValuedPathExpression expression.
 void visit(ComparisonExpression expression)
          Visits the ComparisonExpression expression.
 void visit(ConcatExpression expression)
          Visits the ConcatExpression expression.
 void visit(ConstructorExpression expression)
          Visits the ConstructorExpression expression.
 void visit(CountFunction expression)
          Visits the CountFunction expression.
 void visit(DateTime expression)
          Visits the DateTime expression.
 void visit(DeleteClause expression)
          Visits the DeleteClause expression.
 void visit(DeleteStatement expression)
          Visits the DeleteStatement expression.
 void visit(DivisionExpression expression)
          Visits the DivisionExpression expression.
 void visit(EmptyCollectionComparisonExpression expression)
          Visits the EmptyCollectionComparisonExpression expression.
 void visit(EntityTypeLiteral expression)
          Visits the EntityTypeLiteral expression.
 void visit(EntryExpression expression)
          Visits the EntryExpression expression.
 void visit(ExistsExpression expression)
          Visits the ExistsExpression expression.
protected  void visit(Expression expression)
          Blindly visit the given Expression.
 void visit(FromClause expression)
          Visits the FromClause expression.
 void visit(FunctionExpression expression)
          Visits the FunctionExpression expression.
 void visit(GroupByClause expression)
          Visits the GroupByClause expression.
 void visit(HavingClause expression)
          Visits the HavingClause expression.
 void visit(IdentificationVariable expression)
          Visits the IdentificationVariable expression.
 void visit(IdentificationVariableDeclaration expression)
          Visits the IdentificationVariableDeclaration expression.
 void visit(IndexExpression expression)
          Visits the IndexExpression expression.
 void visit(InExpression expression)
          Visits the InExpression expression.
 void visit(InputParameter expression)
          Visits the InputParameter expression.
 void visit(Join expression)
          Visits the Join expression.
 void visit(JPQLExpression expression)
          Visits the JPQLExpression expression.
 void visit(KeyExpression expression)
          Visits the KeyExpression expression.
 void visit(KeywordExpression expression)
          Visits the KeywordExpression expression.
 void visit(LengthExpression expression)
          Visits the LengthExpression expression.
 void visit(LikeExpression expression)
          Visits the LikeExpression expression.
 void visit(LocateExpression expression)
          Visits the LocateExpression expression.
 void visit(LowerExpression expression)
          Visits the LowerExpression expression.
 void visit(MaxFunction expression)
          Visits the MaxFunction expression.
 void visit(MinFunction expression)
          Visits the MinFunction expression.
 void visit(ModExpression expression)
          Visits the ModExpression expression.
 void visit(MultiplicationExpression expression)
          Visits the MultiplicationExpression expression.
 void visit(NotExpression expression)
          Visits the NotExpression expression.
 void visit(NullComparisonExpression expression)
          Visits the NullComparisonExpression expression.
 void visit(NullExpression expression)
          Visits the NullExpression expression.
 void visit(NullIfExpression expression)
          Visits the NullIfExpression expression.
 void visit(NumericLiteral expression)
          Visits the NumericLiteral expression.
 void visit(ObjectExpression expression)
          Visits the ObjectExpression expression.
 void visit(OnClause expression)
          Visits the OnClause expression.
 void visit(OrderByClause expression)
          Visits the OrderByClause expression.
 void visit(OrderByItem expression)
          Visits the OrderByItem expression.
 void visit(OrExpression expression)
          Visits the OrExpression expression.
 void visit(RangeVariableDeclaration expression)
          Visits the RangeVariableDeclaration expression.
 void visit(ResultVariable expression)
          Visits the ResultVariable expression.
 void visit(SelectClause expression)
          Visits the SelectClause expression.
 void visit(SelectStatement expression)
          Visits the SelectStatement expression.
 void visit(SimpleFromClause expression)
          Visits the SimpleFromClause expression.
 void visit(SimpleSelectClause expression)
          Visits the SimpleSelectClause expression.
 void visit(SimpleSelectStatement expression)
          Visits the SimpleSelectStatement expression.
 void visit(SizeExpression expression)
          Visits the SizeExpression expression.
 void visit(SqrtExpression expression)
          Visits the SqrtExpression expression.
 void visit(StateFieldPathExpression expression)
          Visits the StateFieldPathExpression expression.
 void visit(StringLiteral expression)
          Visits the StringLiteral expression.
 void visit(SubExpression expression)
          Visits the SubExpression expression.
 void visit(SubstringExpression expression)
          Visits the SubstringExpression expression.
 void visit(SubtractionExpression expression)
          Visits the SubtractionExpression expression.
 void visit(SumFunction expression)
          Visits the SumFunction expression.
 void visit(TreatExpression expression)
          Visits the TreatExpression expression.
 void visit(TrimExpression expression)
          Visits the TrimExpression expression.
 void visit(TypeExpression expression)
          Visits the TypeExpression expression.
 void visit(UnknownExpression expression)
          Visits the UnknownExpression expression.
 void visit(UpdateClause expression)
          Visits the UpdateClause expression.
 void visit(UpdateItem expression)
          Visits the UpdateItem expression.
 void visit(UpdateStatement expression)
          Visits the UpdateStatement expression.
 void visit(UpperExpression expression)
          Visits the UpperExpression expression.
 void visit(ValueExpression expression)
          Visits the ValueExpression expression.
 void visit(WhenClause expression)
          Visits the WhenClause expression.
 void visit(WhereClause expression)
          Visits the WhereClause expression.
protected  void visitAggregateFunction(AggregateFunction expression)
           
protected  void visitArithmeticExpression(ArithmeticExpression expression)
           
protected
<T extends Expression>
void
visitCollectionExpression(T expression, java.lang.String identifier, AbstractContentAssistVisitor.CollectionExpressionHelper<T> helper)
          Adds the possible proposals for the given expression based on the location of the cursor and the content of the expression.
protected  void visitEncapsulatedExpression(AbstractEncapsulatedExpression expression, java.lang.String identifier, java.lang.String jpqlQueryBNF)
          Adds the possible proposals for the given expression based on the location of the cursor and the content of the expression.
protected  void visitEndingExpression(Expression expression)
           
protected  void visitEnumConstant(AbstractPathExpression expression)
           
protected  void visitInvalidExpression(Expression expression)
           
protected  void visitLogicalExpression(LogicalExpression expression, java.lang.String identifier)
           
protected  AbstractContentAssistVisitor.VisitParentVisitor visitParentVisitor()
           
protected  void visitPathExpression(AbstractPathExpression expression)
           
protected  void visitPathExpression(AbstractPathExpression expression, Filter<IMapping> filter)
           
protected  void visitSingleEncapsulatedExpression(AbstractSingleEncapsulatedExpression expression, AbstractContentAssistVisitor.IdentificationVariableType identificationVariableType)
          Adds the possible proposals for the given expression based on the location of the cursor and the content of the expression.
protected  void visitSingleEncapsulatedExpression(AbstractSingleEncapsulatedExpression expression, AbstractContentAssistVisitor.IdentificationVariableType identificationVariableType, java.lang.String... expressionIdentifiers)
          Adds the possible proposals for the given expression based on the location of the cursor and the content of the expression.
protected
<T extends Expression>
void
visitStatement(T expression, AbstractContentAssistVisitor.StatementHelper<T> helper)
          Visits the given AbstractSelectStatement and checks to see if the identifiers of the following clauses can be added a valid proposals.
protected  void visitThirdPartyPathExpression(AbstractPathExpression expression, java.lang.String variableName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

compoundTypeFilters

protected java.util.Map<java.lang.String,AbstractContentAssistVisitor.CompoundTypeFilter> compoundTypeFilters

corrections

protected java.util.Stack<java.lang.Integer> corrections
This is used to change the position of the cursor in order to add possible proposals


helpers

protected java.util.Map<java.lang.Class<?>,java.lang.Object> helpers
The cached helpers that are used by this visitor to add valid content assist proposals.


indexWithinCollection

protected java.util.Stack<java.lang.Integer> indexWithinCollection
Used to determine if the cursor is an expression contained in a collection, if not, then this value is set to -1.


lockedExpressions

protected java.util.Stack<Expression> lockedExpressions
Used to prevent and infinite recursion when one of the visit method is virtually asking a child expression to be visited.


proposals

protected DefaultContentAssistProposals proposals
The set of possible proposals gathered based on the position in the query.


queryContext

protected final JPQLQueryContext queryContext
The context used to query information about the JPQL query.


queryPosition

protected QueryPosition queryPosition
Contains the position of the cursor within the parsed Expression from the root node up to the deepest leaf node.


virtualSpaces

protected java.util.Stack<java.lang.Integer> virtualSpaces
A virtual space is used to move the position of the cursor by adding an extra space in order to find some proposals within an expression. This is usually used when the trailing whitespace is not owned by the child expression but by one of its parents.


word

protected java.lang.String word
The current word, which was retrieved from the JPQL query based on the position of the cursor. The word is the partial string found to the left of the cursor and up to the cursor.


wordParser

protected WordParser wordParser
This is used to retrieve words from the actual JPQL query.


SPACE_LENGTH

protected static final int SPACE_LENGTH
A constant for the length of a whitespace, which is 1.

See Also:
Constant Field Values
Constructor Detail

AbstractContentAssistVisitor

protected AbstractContentAssistVisitor(JPQLQueryContext queryContext)
Creates a new AbstractContentAssistVisitor.

Parameters:
queryContext - The context used to query information about the JPQL query
Throws:
java.lang.NullPointerException - The JPQLQueryContext cannot be null
Method Detail

addAdditionalFunctions

protected void addAdditionalFunctions(AbstractExpression expression)

addAggregate

protected void addAggregate(java.lang.String identifier)
Adds the given JPQL identifier as a valid proposal if its role is IdentifierRole.AGGREGATE and the beginning starts with the current word.

Parameters:
identifier - The JPQL identifier to add as a valid proposal if it passes the checks

addAllAggregates

protected void addAllAggregates(JPQLQueryBNF queryBNF)
Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.AGGREGATE and the beginning starts with the current word.

Parameters:
queryBNF - The JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks

addAllAggregates

protected void addAllAggregates(java.lang.String queryBNFId)
Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.AGGREGATE and the beginning starts with the current word.

Parameters:
queryBNFId - The unique of the JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks

addAllArithmeticIdentifiers

protected void addAllArithmeticIdentifiers()

addAllClauses

protected void addAllClauses(JPQLQueryBNF queryBNF)
Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.CLAUSE and the beginning starts with the current word.

Parameters:
queryBNF - The JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks

addAllClauses

protected void addAllClauses(java.lang.String queryBNF)
Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.CLAUSE and the beginning starts with the current word.

Parameters:
queryBNF - The unique identifier of the JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks

addAllComparisonIdentifiers

protected void addAllComparisonIdentifiers()

addAllCompounds

protected void addAllCompounds(JPQLQueryBNF queryBNF,
                               Expression expression,
                               boolean hasIs,
                               boolean hasNot)
Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.COMPOUND_FUNCTION and the beginning starts with the current word.

Parameters:
queryBNF - The JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks
expression -

addAllCompounds

protected void addAllCompounds(java.lang.String queryBNFId,
                               Expression expression,
                               boolean hasIs,
                               boolean hasNot)
Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.COMPOUND_FUNCTION and the beginning starts with the current word.

Parameters:
queryBNFId - The unique identifier of the JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks
expression -

addAllEnumConstants

protected void addAllEnumConstants(IType enumType,
                                   java.lang.String word)
Adds the constants of the given enum type as valid proposals if the beginning starts with the given word.

Parameters:
enumType - The IType of the enum type
word - The word is used to filter the enum constants, which can be null or an empty string

addAllExpressionFactoryIdentifiers

protected void addAllExpressionFactoryIdentifiers(ExpressionFactory expressionFactory)

addAllExpressionFactoryIdentifiers

protected void addAllExpressionFactoryIdentifiers(java.lang.String expressionFactoryId)

addAllFunctions

protected void addAllFunctions(JPQLQueryBNF queryBNF)
Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.FUNCTION and the beginning starts with the current word.

Parameters:
queryBNF - The JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks

addAllFunctions

protected void addAllFunctions(java.lang.String queryBNFId)
Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if their role is IdentifierRole.FUNCTION and the beginning starts with the current word.

Parameters:
queryBNFId - The unique identifier of the JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks

addAllIdentificationVariables

protected void addAllIdentificationVariables()
Adds all the identification variables defined in the current query's FROM clause.


addAllIdentifiers

protected void addAllIdentifiers(JPQLQueryBNF queryBNF)
Adds the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if the beginning starts with the current word.

Parameters:
queryBNF - The JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks

addAllIdentifiers

protected void addAllIdentifiers(java.lang.String queryBNFId)
Adds the unique identifier of the JPQL identifiers that are registered with the given JPQLQueryBNF as valid proposals if the beginning starts with the current word.

Parameters:
queryBNFId - The unique identifier of the JPQLQueryBNF for which the registered JPQL identifiers will be added as proposals if they pass the checks

addAllLogicalIdentifiers

protected void addAllLogicalIdentifiers()
Adds the logical identifiers, which are AND and OR.


addAllResultVariables

protected void addAllResultVariables()
Adds the result variables defined in the SELECT clause as valid proposals.


addClause

protected void addClause(java.lang.String identifier)
Adds the given JPQL identifier as a valid proposal if its role is IdentifierRole.CLAUSE and the beginning starts with the current word.

Parameters:
identifier - The JPQL identifier to add as a valid proposal if it passes the checks

addCompositeIdentifier

protected void addCompositeIdentifier(java.lang.String identifier)

addCompound

protected void addCompound(java.lang.String identifier,
                           Expression expression,
                           boolean hasIs,
                           boolean hasNot)
Adds the given JPQL identifier as a valid proposal if its role is IdentifierRole.COMPOUND_FUNCTION and the beginning starts with the current word.

Parameters:
identifier - The JPQL identifier to add as a valid proposal if it passes the checks
expression -

addEntities

protected void addEntities()
Adds the abstract schema types as possible content assist proposals but will be filtered using the current word.


addEntities

protected void addEntities(IType type)
Adds the abstract schema types as possible content assist proposals but will be filtered using the current word and the entity's type will have to match the one from the given IType.

Parameters:
type - The IType used to filter the abstract schema types

addEnumConstant

protected void addEnumConstant(IType enumType,
                               java.lang.String enumConstant)
Adds the constants of the given enum constant as a valid proposal.

Parameters:
enumType - The IType of the enum type
enumConstant - The enum constant to be added as a valid proposal

addFunction

protected void addFunction(java.lang.String identifier)
Adds the given JPQL identifier as a valid proposal if its role is IdentifierRole.FUNCTION and the beginning starts with the current word.

Parameters:
identifier - The JPQL identifier to add as a valid proposal if it passes the checks

addIdentificationVariable

protected void addIdentificationVariable(java.lang.String identificationVariable)
Adds the given identification variable as a valid proposal.

Parameters:
identificationVariable - The identification variable to add as a proposal if it passes the checks

addIdentificationVariables

protected void addIdentificationVariables(AbstractContentAssistVisitor.IdentificationVariableType type,
                                          Expression expression)
Adds the possible identifier variables as valid proposals but filter them based on the given type.

For instance, if the type is AbstractContentAssistVisitor.IdentificationVariableType.LEFT, then any identification variables that have been defined before the given Expression are valid proposals, but those defined after are not valid proposals.

Parameters:
type - Which type of identification variables to add as valid proposals
expression - The Expression where the content assist was invoked, which helps to determine how to stop adding identification variable

addIdentifier

protected void addIdentifier(java.lang.String identifier)
Adds the given identifier as a proposal if it passes the checks.

Parameters:
identifier - The JPQL identifier to add as a proposal

addIdentifier

protected void addIdentifier(java.lang.String identifier,
                             java.lang.String word)
Adds the given proposal as a proposal if it passes the checks.

Parameters:
identifier - The JPQL identifier to add as a proposal
word - The string used to determine if the identifier starts with it

addJoinIdentifiers

protected void addJoinIdentifiers()
Adds the join specification identifiers as proposals without validation.


addLeftIdentificationVariables

protected void addLeftIdentificationVariables(Expression expression)
Adds the identification variables defined in the current query's FROM clause that are declared before the given Expression.

Parameters:
expression - The Expression used to determine at which declaration to stop

addMultipleWordsIdentifier

protected boolean addMultipleWordsIdentifier(java.lang.String identifier,
                                             int position,
                                             java.lang.String partialEnding,
                                             int endIndex)
Adds the given identifier as a proposal. If the JPQL identifier has more than one word, what precedes the given position will be checked in order to filter out some identifiers. For example: "... WHERE IS NOT |" has IS NOT already defined, that means IS NOT EMPTY, IS NOT NULL will be filtered out. The only valid proposals in this case is EMPTY and NULL.

Parameters:
identifier - The JPQL identifier to add as a proposal
position - The position of the cursor to use for determining if the given JPQL identifier is a valid proposal
partialEnding - The possible characters that could be identifiers and might be part of a JPQL identifier with more than one word
endIndex - The position used to stop matching the partial ending with what is found before the position of the cursor
Returns:
true if the given JPQL identifier was added as a proposal; false otherwise

addRangeIdentificationVariable

protected void addRangeIdentificationVariable(java.lang.String identificationVariable)
Adds the given identification variable as a proposal if it passes the checks. If an entity is found, then it will be registered.


addVirtualSpace

protected final void addVirtualSpace()
Adds a virtual space on the stack.


areArithmeticSymbolsAppendable

protected boolean areArithmeticSymbolsAppendable(Expression expression)
Determines whether

Parameters:
expression -
Returns:

areComparisonSymbolsAppendable

protected boolean areComparisonSymbolsAppendable(Expression expression)
Determines

Parameters:
-
Returns:

areLogicalSymbolsAppendable

protected boolean areLogicalSymbolsAppendable(Expression expression)
Determines whether

Parameters:
expression -
Returns:

buildAbstractConditionalClauseCollectionHelper

protected AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper buildAbstractConditionalClauseCollectionHelper()

buildAcceptableTypeVisitor

protected abstract AbstractContentAssistVisitor.AcceptableTypeVisitor buildAcceptableTypeVisitor()

buildAppendableExpressionVisitor

protected AbstractContentAssistVisitor.AppendableExpressionVisitor buildAppendableExpressionVisitor()

buildCollectionExpressionVisitor

protected AbstractContentAssistVisitor.CollectionExpressionVisitor buildCollectionExpressionVisitor()
Creates a visitor that collects the CollectionExpression if it's been visited.

Returns:
A new AbstractContentAssistVisitor.CollectionExpressionVisitor

buildCollectionMappingFilter

protected AbstractContentAssistVisitor.CollectionMappingFilter buildCollectionMappingFilter()

buildCompoundExpressionHelper

protected AbstractContentAssistVisitor.CompoundExpressionHelper buildCompoundExpressionHelper()

buildConcatExpressionCollectionHelper

protected AbstractContentAssistVisitor.ConcatExpressionCollectionHelper buildConcatExpressionCollectionHelper()

buildConstrutorCollectionHelper

protected AbstractContentAssistVisitor.ConstrutorCollectionHelper buildConstrutorCollectionHelper()

buildDeclarationVisitor

protected AbstractContentAssistVisitor.DeclarationVisitor buildDeclarationVisitor()

buildDefaultMappingCollector

protected AbstractContentAssistVisitor.DefaultMappingCollector buildDefaultMappingCollector()

buildDeleteClauseCollectionHelper

protected AbstractContentAssistVisitor.DeleteClauseCollectionHelper buildDeleteClauseCollectionHelper()

buildDeleteClauseStatementHelper

protected AbstractContentAssistVisitor.DeleteClauseStatementHelper buildDeleteClauseStatementHelper()

buildDoubleEncapsulatedCollectionHelper

protected AbstractContentAssistVisitor.DoubleEncapsulatedCollectionHelper buildDoubleEncapsulatedCollectionHelper()

buildEmptyCompoundTypeFilter

protected AbstractContentAssistVisitor.CompoundTypeFilter buildEmptyCompoundTypeFilter()

buildEncapsulatedExpressionVisitor

protected AbstractContentAssistVisitor.EncapsulatedExpressionVisitor buildEncapsulatedExpressionVisitor()

buildEndingPositionFromInvalidExpression

protected QueryPosition buildEndingPositionFromInvalidExpression(Expression expression,
                                                                 boolean visitExpressionOnly,
                                                                 boolean[] virtualSpace)

buildEndingQueryPositionBuilder

protected AbstractContentAssistVisitor.EndingQueryPositionBuilder buildEndingQueryPositionBuilder()

buildEnumVisitor

protected AbstractContentAssistVisitor.EnumVisitor buildEnumVisitor()

buildFilteringMappingCollector

protected AbstractContentAssistVisitor.FilteringMappingCollector buildFilteringMappingCollector(AbstractPathExpression expression,
                                                                                                Resolver resolver,
                                                                                                Filter<IMapping> filter,
                                                                                                java.lang.String pattern)

buildFollowingClausesVisitor

protected AbstractContentAssistVisitor.FollowingClausesVisitor buildFollowingClausesVisitor()

buildFollowingInvalidExpressionVisitor

protected AbstractContentAssistVisitor.FollowingInvalidExpressionVisitor buildFollowingInvalidExpressionVisitor()

buildFromClauseCollectionHelper

protected AbstractContentAssistVisitor.FromClauseCollectionHelper buildFromClauseCollectionHelper()

buildFromClauseStatementHelper

protected AbstractContentAssistVisitor.FromClauseStatementHelper buildFromClauseStatementHelper()

buildGroupByClauseCollectionHelper

protected AbstractContentAssistVisitor.GroupByClauseCollectionHelper buildGroupByClauseCollectionHelper()

buildGroupByClauseStatementHelper

protected AbstractContentAssistVisitor.GroupByClauseStatementHelper buildGroupByClauseStatementHelper()

buildHavingClauseStatementHelper

protected AbstractContentAssistVisitor.HavingClauseStatementHelper buildHavingClauseStatementHelper()

buildIncompleteCollectionExpressionVisitor

protected AbstractContentAssistVisitor.IncompleteCollectionExpressionVisitor buildIncompleteCollectionExpressionVisitor()

buildInvalidExpressionVisitor

protected AbstractContentAssistVisitor.InvalidExpressionVisitor buildInvalidExpressionVisitor()

buildJoinCollectionHelper

protected AbstractContentAssistVisitor.JoinCollectionHelper buildJoinCollectionHelper()

buildJPQLQueryBNFValidator

protected AbstractValidator.JPQLQueryBNFValidator buildJPQLQueryBNFValidator(JPQLQueryBNF queryBNF)
Returns the AbstractValidator.JPQLQueryBNFValidator that can be used to validate an Expression by making sure its BNF is part of the given BNF.

Parameters:
queryBNF - The BNF used to determine the validity of an Expression
Returns:
A AbstractValidator.JPQLQueryBNFValidator that can determine if an Expression follows the given BNF

buildJPQLQueryBNFValidator

protected AbstractValidator.JPQLQueryBNFValidator buildJPQLQueryBNFValidator(java.lang.String queryBNFId)
Returns the AbstractValidator.JPQLQueryBNFValidator that can be used to validate an Expression by making sure its BNF is part of the given BNF.

Parameters:
queryBNFId - The unique identifier of the BNF used to determine the validity of an Expression
Returns:
A AbstractValidator.JPQLQueryBNFValidator that can determine if an Expression follows the given BNF

buildMappingCollector

protected AbstractContentAssistVisitor.MappingCollector buildMappingCollector(AbstractPathExpression expression,
                                                                              Resolver resolver,
                                                                              Filter<IMapping> filter)

buildMappingFilter

protected Filter<IMapping> buildMappingFilter(AbstractPathExpression expression,
                                              Filter<IMapping> filter)

buildMappingFilter

protected Filter<IMapping> buildMappingFilter(Expression expression)

buildMappingFilterBuilder

protected AbstractContentAssistVisitor.MappingFilterBuilder buildMappingFilterBuilder()

buildNotExpressionVisitor

protected AbstractContentAssistVisitor.NotExpressionVisitor buildNotExpressionVisitor()

buildNullExpressionVisitor

protected AbstractContentAssistVisitor.NullExpressionVisitor buildNullExpressionVisitor()
Creates a visitor that collects the NullExpression if it's been visited.

Returns:
A new AbstractContentAssistVisitor.NullExpressionVisitor

buildOrderByClauseCollectionHelper

protected AbstractContentAssistVisitor.OrderByClauseCollectionHelper buildOrderByClauseCollectionHelper()

buildOrderByClauseStatementHelper

protected AbstractContentAssistVisitor.OrderByClauseStatementHelper buildOrderByClauseStatementHelper()

buildPropertyMappingFilter

protected AbstractContentAssistVisitor.PropertyMappingFilter buildPropertyMappingFilter()

buildProposals

public ContentAssistProposals buildProposals(int position)
Prepares this visitor by prepopulating it with the necessary data that is required to properly gather the list of proposals based on the given caret position.

Parameters:
position - The position of the cursor within the JPQL query
Returns:
The proposals that are valid choices for the given position

buildProposals

public ContentAssistProposals buildProposals(int position,
                                             ContentAssistExtension extension)
Prepares this visitor by prepopulating it with the necessary data that is required to properly gather the list of proposals based on the given caret position.

Parameters:
position - The position of the cursor within the JPQL query
extension - This extension can be used to provide additional support to JPQL content assist that is outside the scope of providing proposals related to JPA metadata. It adds support for providing suggestions related to class names, enum constants, table names, column names
Returns:
The proposals that are valid choices for the given position

buildRangeVariableDeclarationVisitor

protected AbstractContentAssistVisitor.RangeVariableDeclarationVisitor buildRangeVariableDeclarationVisitor()

buildResultVariableVisitor

protected AbstractContentAssistVisitor.ResultVariableVisitor buildResultVariableVisitor()

buildSelectClauseCollectionHelper

protected AbstractContentAssistVisitor.SelectClauseCollectionHelper buildSelectClauseCollectionHelper()

buildSelectClauseStatementHelper

protected AbstractContentAssistVisitor.SelectClauseStatementHelper buildSelectClauseStatementHelper()

buildSimpleFromClauseStatementHelper

protected AbstractContentAssistVisitor.SimpleFromClauseStatementHelper buildSimpleFromClauseStatementHelper()

buildSimpleGroupByClauseStatementHelper

protected AbstractContentAssistVisitor.SimpleGroupByClauseStatementHelper buildSimpleGroupByClauseStatementHelper()

buildSimpleHavingClauseStatementHelper

protected AbstractContentAssistVisitor.SimpleHavingClauseStatementHelper buildSimpleHavingClauseStatementHelper()

buildSimpleSelectClauseCollectionHelper

protected AbstractContentAssistVisitor.SimpleSelectClauseCollectionHelper buildSimpleSelectClauseCollectionHelper()

buildSimpleSelectClauseStatementHelper

protected AbstractContentAssistVisitor.SimpleSelectClauseStatementHelper buildSimpleSelectClauseStatementHelper()

buildSimpleWhereClauseSelectStatementHelper

protected AbstractContentAssistVisitor.SimpleWhereClauseSelectStatementHelper buildSimpleWhereClauseSelectStatementHelper()

buildSubqueryAppendableExpressionVisitor

protected AbstractContentAssistVisitor.SubqueryAppendableExpressionVisitor buildSubqueryAppendableExpressionVisitor()

buildSubqueryVisitor

protected AbstractContentAssistVisitor.SubqueryVisitor buildSubqueryVisitor()

buildTrailingCompleteness

protected AbstractContentAssistVisitor.TrailingCompletenessVisitor buildTrailingCompleteness()

buildTripleEncapsulatedCollectionHelper

protected AbstractContentAssistVisitor.TripleEncapsulatedCollectionHelper buildTripleEncapsulatedCollectionHelper()

buildUpdateClauseStatementHelper

protected AbstractContentAssistVisitor.UpdateClauseStatementHelper buildUpdateClauseStatementHelper()

buildUpdateItemCollectionHelper

protected AbstractContentAssistVisitor.UpdateItemCollectionHelper buildUpdateItemCollectionHelper()

buildVisitParentVisitor

protected AbstractContentAssistVisitor.VisitParentVisitor buildVisitParentVisitor()

buildWhereClauseDeleteStatementHelper

protected AbstractContentAssistVisitor.WhereClauseDeleteStatementHelper buildWhereClauseDeleteStatementHelper()

buildWhereClauseSelectStatementHelper

protected AbstractContentAssistVisitor.WhereClauseSelectStatementHelper buildWhereClauseSelectStatementHelper()

buildWhereClauseUpdateStatementHelper

protected AbstractContentAssistVisitor.WhereClauseUpdateStatementHelper buildWhereClauseUpdateStatementHelper()

buildWithinInvalidExpressionVisitor

protected AbstractContentAssistVisitor.WithinInvalidExpressionVisitor buildWithinInvalidExpressionVisitor()

dispose

public void dispose()
Disposes this visitor.


entities

protected java.lang.Iterable<IEntity> entities()
Returns the collection of possible abstract schema types.

Returns:
The entities defined in the persistence context

findIndex

protected int findIndex(CollectionExpression expression)

findRangeVariableDeclaration

protected RangeVariableDeclaration findRangeVariableDeclaration(UpdateClause expression)

getAbstractConditionalClauseCollectionHelper

protected AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper getAbstractConditionalClauseCollectionHelper()

getAcceptableType

protected IType getAcceptableType(Expression expression)
Determines the root IType that any type should be assignable. If the IType is Number, than any subclasses will be allowed.

Parameters:
expression - The Expression to visit, including its parent hierarchy until an Expression requires a certain IType
Returns:
The root IType allowed or null if anything is allowed

getAppendableExpressionVisitor

protected AbstractContentAssistVisitor.AppendableExpressionVisitor getAppendableExpressionVisitor()

getCollectionExpression

protected CollectionExpression getCollectionExpression(Expression expression)
Casts the given Expression to a CollectionExpression if it is actually an object of that type.

Parameters:
expression - The Expression to cast
Returns:
The given Expression if it is a CollectionExpression or null if it is any other object

getCollectionExpressionVisitor

protected AbstractContentAssistVisitor.CollectionExpressionVisitor getCollectionExpressionVisitor()
Returns the visitor that collects the CollectionExpression if it's been visited.

Returns:
The AbstractContentAssistVisitor.CollectionExpressionVisitor
See Also:
buildCollectionExpressionVisitor()

getCompletenessVisitor

protected AbstractContentAssistVisitor.CompletenessVisitor getCompletenessVisitor()

getCompoundExpressionHelper

protected AbstractContentAssistVisitor.CompoundExpressionHelper getCompoundExpressionHelper()

getConcatExpressionCollectionHelper

protected AbstractContentAssistVisitor.ConcatExpressionCollectionHelper getConcatExpressionCollectionHelper()

getConstructorCollectionHelper

protected AbstractContentAssistVisitor.ConstrutorCollectionHelper getConstructorCollectionHelper()

getCorrections

protected final java.util.Stack<java.lang.Integer> getCorrections()
Returns

Returns:

getCoumpoundTypeFilter

protected AbstractContentAssistVisitor.CompoundTypeFilter getCoumpoundTypeFilter(java.lang.String identifier)

getDeclarationVisitor

protected AbstractContentAssistVisitor.DeclarationVisitor getDeclarationVisitor()

getDefaultMappingCollector

protected AbstractContentAssistVisitor.MappingCollector getDefaultMappingCollector()

getDeleteClauseCollectionHelper

protected AbstractContentAssistVisitor.DeleteClauseCollectionHelper getDeleteClauseCollectionHelper()

getDeleteClauseStatementHelper

protected AbstractContentAssistVisitor.DeleteClauseStatementHelper getDeleteClauseStatementHelper()

getDoubleEncapsulatedCollectionHelper

protected AbstractContentAssistVisitor.DoubleEncapsulatedCollectionHelper getDoubleEncapsulatedCollectionHelper()

getEmbeddable

protected IEmbeddable getEmbeddable(IType type)
Retrieves the IEmbeddable for the given IType if one exists.

Parameters:
type - The IType that is mapped as an embeddable
Returns:
The given IType mapped as an embeddable; null if none exists or if it's mapped as a different managed type

getEncapsulatedExpressionVisitor

protected AbstractContentAssistVisitor.EncapsulatedExpressionVisitor getEncapsulatedExpressionVisitor()

getEndingQueryPositionBuilder

protected AbstractContentAssistVisitor.EndingQueryPositionBuilder getEndingQueryPositionBuilder()

getEntity

protected IEntity getEntity(IType type)
Retrieves the IEntity for the given IType if one exists.

Parameters:
type - The IType that is mapped as an entity
Returns:
The given IType mapped as an entity; null if none exists or if it's mapped as a different managed type

getEntityNamed

protected IEntity getEntityNamed(java.lang.String entityName)
Retrieves the entity with the given abstract schema name, which can also be the entity class name.

Parameters:
entityName - The abstract schema name, which can be different from the entity class name but by default, it's the same
Returns:
The managed type that has the given name or null if none could be found

getEnumVisitor

protected AbstractContentAssistVisitor.EnumVisitor getEnumVisitor()

getExpressionFactory

protected ExpressionFactory getExpressionFactory(java.lang.String expressionFactoryId)
Retrieves the registered ExpressionFactory that was registered for the given unique identifier.

Parameters:
expressionFactoryId - The unique identifier of the ExpressionFactory to retrieve
Returns:
The ExpressionFactory mapped with the given unique identifier

getExpressionRegistry

protected ExpressionRegistry getExpressionRegistry()
Returns the registry containing the JPQLQueryBNFs and the ExpressionFactories that are used to properly parse a JPQL query.

Returns:
The registry containing the information related to the JPQL grammar

getExpressionTypeVisitor

protected AbstractContentAssistVisitor.AcceptableTypeVisitor getExpressionTypeVisitor()

getFollowingClausesVisitor

protected AbstractContentAssistVisitor.FollowingClausesVisitor getFollowingClausesVisitor()

getFollowingInvalidExpressionVisitor

protected AbstractContentAssistVisitor.FollowingInvalidExpressionVisitor getFollowingInvalidExpressionVisitor()

getFromClauseCollectionHelper

protected AbstractContentAssistVisitor.FromClauseCollectionHelper getFromClauseCollectionHelper()

getFromClauseStatementHelper

protected AbstractContentAssistVisitor.FromClauseStatementHelper getFromClauseStatementHelper()

getGrammar

protected JPQLGrammar getGrammar()
Returns the JPQL grammar that will be used to define how to parse a JPQL query.

Returns:
The grammar that was used to parse this Expression

getGroupByClauseCollectionHelper

protected AbstractContentAssistVisitor.GroupByClauseCollectionHelper getGroupByClauseCollectionHelper()

getGroupByClauseStatementHelper

protected AbstractContentAssistVisitor.GroupByClauseStatementHelper getGroupByClauseStatementHelper()

getHavingClauseStatementHelper

protected AbstractContentAssistVisitor.HavingClauseStatementHelper getHavingClauseStatementHelper()

getHelper

protected final <T> T getHelper(java.lang.Class<T> helperClass)
Retrieves the helper associated with the given helper class.

Parameters:
helperClass - The Java class of the helper to retrieve
Returns:
The helper being requested

getIdentifierRole

protected IdentifierRole getIdentifierRole(java.lang.String identifier)
Retrieves the role of the given identifier. A role helps to describe the purpose of the identifier in a query.

Parameters:
identifier - The identifier for which its role is requested
Returns:
The role of the given identifier

getIdentifierVersion

protected JPAVersion getIdentifierVersion(java.lang.String identifier)
Retrieves the JPA version in which the identifier was first introduced.

Returns:
The version in which the identifier was introduced

getIncompleteCollectionExpressionVisitor

protected AbstractContentAssistVisitor.CompletenessVisitor getIncompleteCollectionExpressionVisitor()

getInvalidExpressionVisitor

protected AbstractContentAssistVisitor.InvalidExpressionVisitor getInvalidExpressionVisitor()

getJoinCollectionHelper

protected AbstractContentAssistVisitor.JoinCollectionHelper getJoinCollectionHelper()

getJPAVersion

protected JPAVersion getJPAVersion()
Returns the version of the Java Persistence this entity for which it was defined.

Returns:
The version of the Java Persistence being used

getJPQLExpression

protected JPQLExpression getJPQLExpression()
Returns the parsed tree representation of the JPQL query.

Returns:
The parsed tree representation of the JPQL query

getManagedType

protected IManagedType getManagedType(IType type)
Retrieves the entity for the given type.

Parameters:
type - The type that is used as a managed type
Returns:
The managed type for the given type, if one exists, null otherwise

getMappedSuperclass

protected IMappedSuperclass getMappedSuperclass(IType type)
Retrieves the IMappedSuperclass for the given IType if one exists.

Parameters:
type - The IType that is mapped as an embeddable
Returns:
The given IType mapped as an mapped super class; null if none exists or if it's mapped as a different managed type

getMapping

protected IMapping getMapping(Expression expression)
Returns the IMapping for the field represented by the given Expression.

Parameters:
expression - The Expression representing a state field path expression or a collection-valued path expression
Returns:
Either the IMapping or null if none exists

getMappingCollectionFilter

protected Filter<IMapping> getMappingCollectionFilter()

getMappingFilterBuilder

protected AbstractContentAssistVisitor.MappingFilterBuilder getMappingFilterBuilder()

getMappingPropertyFilter

protected Filter<IMapping> getMappingPropertyFilter()

getNotExpressionVisitor

protected AbstractContentAssistVisitor.NotExpressionVisitor getNotExpressionVisitor()

getNullExpressionVisitor

protected AbstractContentAssistVisitor.NullExpressionVisitor getNullExpressionVisitor()
Returns the visitor that collects the NullExpression if it's been visited.

Returns:
The AbstractContentAssistVisitor.NullExpressionVisitor
See Also:
buildNullExpressionVisitor()

getOrderByClauseCollectionHelper

protected AbstractContentAssistVisitor.OrderByClauseCollectionHelper getOrderByClauseCollectionHelper()

getOrderByClauseStatementHelper

protected AbstractContentAssistVisitor.OrderByClauseStatementHelper getOrderByClauseStatementHelper()

getPosition

protected int getPosition(Expression expression)
Returns the position of the Expression within the parsed tree representation of the JPQL query. The beginning of the string representation is the position returned.

Parameters:
expression - The Expression to find its position in the tree based on the string representation
Returns:
The position within the parsed tree of the given Expression

getProposals

public DefaultContentAssistProposals getProposals()
Returns the object that contains the valid proposals based on the position of the cursor within the JPQL query.

Returns:
The list of proposals

getProvider

protected IManagedTypeProvider getProvider()
Retrieves the provider of managed types.

Returns:
The object that has access to the application's managed types.

getProviderVersion

protected java.lang.String getProviderVersion()
Returns the version of the persistence provider.

Returns:
The version of the persistence provider, if one is extending the default JPQL grammar defined in the Java Persistence specification, otherwise returns an empty string

getQuery

protected IQuery getQuery()
Returns the external form of the JPQL query.

Returns:
The external form of the JPQL query

getQueryBNF

protected JPQLQueryBNF getQueryBNF(java.lang.String queryBNFId)
Retrieves the BNF object that was registered for the given unique identifier.

Parameters:
queryBNFId - The unique identifier of the JPQLQueryBNF to retrieve
Returns:
The JPQLQueryBNF representing a section of the grammar

getQueryContext

protected JPQLQueryContext getQueryContext()
Returns the JPQLQueryContext that is used by this visitor.

Returns:
The JPQLQueryContext holding onto the JPQL query and the cached information

getQueryExpression

protected java.lang.String getQueryExpression()
Returns the string representation of the JPQL query.

Returns:
A non-null string representation of the JPQL query

getRangeVariableDeclarationVisitor

protected AbstractContentAssistVisitor.RangeVariableDeclarationVisitor getRangeVariableDeclarationVisitor()

getResolver

protected Resolver getResolver(Expression expression)
Creates or retrieved the cached Resolver for the given Expression. The Resolver can return the IType and ITypeDeclaration of the Expression and either the IManagedType or the IMapping.

Parameters:
expression - The Expression for which its Resolver will be retrieved
Returns:
Resolver for the given Expression

getResultVariableVisitor

protected AbstractContentAssistVisitor.ResultVariableVisitor getResultVariableVisitor()

getSelectClauseCollectionHelper

protected AbstractContentAssistVisitor.SelectClauseCollectionHelper getSelectClauseCollectionHelper()

getSelectClauseStatementHelper

protected AbstractContentAssistVisitor.SelectClauseStatementHelper getSelectClauseStatementHelper()

getSimpleFromClauseStatementHelper

protected AbstractContentAssistVisitor.SimpleFromClauseStatementHelper getSimpleFromClauseStatementHelper()

getSimpleGroupByClauseStatementHelper

protected AbstractContentAssistVisitor.SimpleGroupByClauseStatementHelper getSimpleGroupByClauseStatementHelper()

getSimpleHavingClauseStatementHelper

protected AbstractContentAssistVisitor.SimpleHavingClauseStatementHelper getSimpleHavingClauseStatementHelper()

getSimpleSelectClauseCollectionHelper

protected AbstractContentAssistVisitor.SimpleSelectClauseCollectionHelper getSimpleSelectClauseCollectionHelper()

getSimpleSelectClauseStatementHelper

protected AbstractContentAssistVisitor.SimpleSelectClauseStatementHelper getSimpleSelectClauseStatementHelper()

getSimpleWhereClauseSelectStatementHelper

protected AbstractContentAssistVisitor.SimpleWhereClauseSelectStatementHelper getSimpleWhereClauseSelectStatementHelper()

getSubqueryAppendableExpressionVisitor

protected AbstractContentAssistVisitor.SubqueryAppendableExpressionVisitor getSubqueryAppendableExpressionVisitor()

getSubqueryVisitor

protected AbstractContentAssistVisitor.SubqueryVisitor getSubqueryVisitor()

getTripleEncapsulatedCollectionHelper

protected AbstractContentAssistVisitor.TripleEncapsulatedCollectionHelper getTripleEncapsulatedCollectionHelper()

getType

protected IType getType(java.lang.Class<?> type)
Retrieves the external type for the given Java type.

Parameters:
type - The Java type to wrap with an external form
Returns:
The external form of the given type

getType

protected IType getType(Expression expression)
Returns the IType of the given Expression.

Parameters:
expression - The Expression for which its type will be calculated
Returns:
Either the IType that was resolved by this Resolver or the IType for IType.UNRESOLVABLE_TYPE if it could not be resolved

getType

protected IType getType(java.lang.String typeName)
Retrieves the external class for the given fully qualified class name.

Parameters:
typeName - The fully qualified class name of the class to retrieve
Returns:
The external form of the class to retrieve

getTypeDeclaration

protected ITypeDeclaration getTypeDeclaration(Expression expression)
Returns the ITypeDeclaration of the field handled by this Resolver.

Parameters:
expression - The Expression for which its type declaration will be calculated
Returns:
Either the ITypeDeclaration that was resolved by this Resolver or the ITypeDeclaration for IType.UNRESOLVABLE_TYPE if it could not be resolved

getTypeHelper

protected TypeHelper getTypeHelper()
Returns a helper that gives access to the most common types.

Returns:
A helper containing a collection of methods related to IType

getTypeRepository

protected ITypeRepository getTypeRepository()
Returns the type repository for the application.

Returns:
The repository of ITypes

getUpdateClauseStatementHelper

protected AbstractContentAssistVisitor.UpdateClauseStatementHelper getUpdateClauseStatementHelper()

getUpdateItemCollectionHelper

protected AbstractContentAssistVisitor.UpdateItemCollectionHelper getUpdateItemCollectionHelper()

getWhereClauseDeleteStatementHelper

protected AbstractContentAssistVisitor.WhereClauseDeleteStatementHelper getWhereClauseDeleteStatementHelper()

getWhereClauseSelectStatementHelper

protected AbstractContentAssistVisitor.WhereClauseSelectStatementHelper getWhereClauseSelectStatementHelper()

getWhereClauseUpdateStatementHelper

protected AbstractContentAssistVisitor.WhereClauseUpdateStatementHelper getWhereClauseUpdateStatementHelper()

getWithinInvalidExpressionVisitor

protected AbstractContentAssistVisitor.WithinInvalidExpressionVisitor getWithinInvalidExpressionVisitor()

hasClausesDefinedBetween

protected boolean hasClausesDefinedBetween(Expression expression,
                                           java.lang.String afterIdentifier,
                                           java.lang.String beforeIdentifier)

hasVirtualSpace

protected final boolean hasVirtualSpace()
Determines whether there is a virtual space to be considered or not.

Returns:
true if there is a virtual space to count as a real one or not

initialize

protected void initialize()
Initializes this visitor.


invalidExpressionPosition

protected int invalidExpressionPosition(CollectionExpression expression,
                                        int positionInCollection)

isAggregate

protected boolean isAggregate(java.lang.String identifier)
Determines whether the given JPQL identifier used in an aggregate expression; for instance AND.

Parameters:
identifier - The identifier to validate
Returns:
true if the given identifier is used in an aggregate expression; false otherwise

isAppendable

protected boolean isAppendable(Expression expression,
                               AbstractContentAssistVisitor.AppendableType appendableType)
Determines whether the given Expression

Parameters:
expression -
appendableType -
Returns:

isAppendableToCollection

protected boolean isAppendableToCollection(Expression expression)
Determines whether

Parameters:
expression -
Returns:

isClause

protected boolean isClause(java.lang.String identifier)
Determines whether the given JPQL identifier used in a clause; for instance SELECT.

Parameters:
identifier - The identifier to validate
Returns:
true if the given identifier is a clause; false otherwise

isClauseAppendable

protected boolean isClauseAppendable(Expression expression)
Determines whether

Parameters:
expression -
Returns:

isComplete

protected boolean isComplete(Expression expression)
Determines whether the given Expression is complete or not. To be complete, it has to be well formed grammatically.

"SELECT e FROM Employee e WHERE e.name = 'JPQL" is complete.
"SELECT e FROM Employee e WHERE AVG(e.age" is incomplete.

Parameters:
expression - The Expression to visit
Returns:
true if the Expression is well formed grammatically; false if it's incomplete

isCompoundable

protected boolean isCompoundable(Expression expression)
Determines whether

Parameters:
expression -
Returns:

isCompoundFunction

protected boolean isCompoundFunction(java.lang.String identifier)
Determines whether the given JPQL identifier used in a compound expression; an example would be BETWEEN or MEMBER.

Parameters:
identifier - The identifier to validate
Returns:
true if the given identifier is used in a compound expression; false otherwise

isDeclaration

protected boolean isDeclaration(AbstractPathExpression expression)

isEncapsulated

protected boolean isEncapsulated(AbstractExpression expression)

isEnumAllowed

protected boolean isEnumAllowed(AbstractPathExpression expression)

isFollowingInvalidExpression

protected boolean isFollowingInvalidExpression(Expression expression)

isFunction

protected boolean isFunction(java.lang.String identifier)
Determines whether the given JPQL identifier is a function, an example would be AVG.

Parameters:
identifier - The identifier to validate
Returns:
true if the given identifier is a function; false otherwise

isGroupByComplete

protected boolean isGroupByComplete(Expression expression)

isInSubquery

protected boolean isInSubquery(Expression expression)
Determines whether the given Expression is in a subquery or in the top-level query.

Parameters:
expression - The Expression to visit its parent hierarchy
Returns:
true if the owning query is a subquery; false if it's the top-level query

isInvalidExpression

protected boolean isInvalidExpression(Expression expression)

isJoinFetchIdentifiable

protected abstract boolean isJoinFetchIdentifiable()
Determines whether a JOIN FETCH expression can be identified by with an identification variable or not.

Returns:
true if the expression can have an identification variable; false otherwise

isLocked

protected boolean isLocked(Expression expression)
Determines whether the given Expression has been set has the lock to prevent an infinite recursion.

Parameters:
expression - The Expression to check if it is locked
Returns:
true if the given Expression has been marked as locked; false otherwise

isNotExpression

protected boolean isNotExpression(Expression expression)

isNull

protected boolean isNull(Expression expression)
Determines whether the given Expression is the NullExpression.

Parameters:
expression - The Expression to visit
Returns:
true if the given Expression is NullExpression; false otherwise

isPositionWithin

protected boolean isPositionWithin(int position,
                                   int offset,
                                   java.lang.String word)
Determines whether the given position is within the given word.

Example: position=0, word="JPQL" => true Example: position=1, word="JPQL" => true Example: position=4, word="JPQL" => true Example: position=5, word="JPQL" => true Example: position=5, offset 2, (actual cursor position is 3), word="JPQL" => true

Parameters:
position - The position of the cursor
offset - The offset to adjust the position
word - The word to check if the cursor is positioned in it
Returns:
true if the given position is within the given word; false otherwise

isPositionWithin

protected boolean isPositionWithin(int position,
                                   java.lang.String word)
Determines whether the given position is within the given word.

Example: position=0, word="JPQL" => true Example: position=1, word="JPQL" => true Example: position=4, word="JPQL" => true Example: position=5, word="JPQL" => true

Parameters:
position - The position of the cursor
word - The word to check if the cursor is positioned in it
Returns:
true if the given position is within the given word; false otherwise

isResultVariable

protected boolean isResultVariable(Expression expression)

isSubqueryAppendable

protected boolean isSubqueryAppendable(Expression expression)
Determines whether

Parameters:
expression -
Returns:

isValid

protected boolean isValid(Expression expression,
                          JPQLQueryBNF queryBNF)
Determines whether the given Expression part is an expression of the given query BNF.

Parameters:
expression - The Expression to validate based on the query BNF
queryBNF -
Returns:
true if the Expression part is a child of the given query BNF; false otherwise

isValid

protected boolean isValid(Expression expression,
                          java.lang.String queryBNFId)
Determines whether the given Expression part is an expression of the given query BNF.

Parameters:
expression - The Expression to validate based on the query BNF
queryBNFId -
Returns:
true if the Expression part is a child of the given query BNF; false otherwise

isValid

protected boolean isValid(JPQLQueryBNF parentQueryBNF,
                          JPQLQueryBNF queryBNF)
Determines whether the given Expression part is an expression of the given query BNF.

Parameters:
parentQueryBNF -
queryBNF -
Returns:
true if the Expression part is a child of the given query BNF; false otherwise

isValid

protected boolean isValid(JPQLQueryBNF parentQueryBNF,
                          JPQLQueryBNF queryBNF,
                          boolean bypassCompound)
Determines whether the given Expression part is an expression of the given query BNF.

Parameters:
parentQueryBNF -
queryBNF -
Returns:
true if the Expression part is a child of the given query BNF; false otherwise

isValid

protected boolean isValid(JPQLQueryBNF parentQueryBNF,
                          java.lang.String queryBNFId)
Determines whether the given Expression part is an expression of the given query BNF.

Parameters:
parentQueryBNF -
queryBNF -
queryBNFId -
Returns:
true if the Expression part is a child of the given query BNF; false otherwise

isValid

protected boolean isValid(JPQLQueryBNF parentQueryBNF,
                          java.lang.String queryBNFId,
                          boolean bypassCompound)
Determines whether the given Expression part is an expression of the given query BNF.

Parameters:
parentQueryBNF -
queryBNF -
queryBNFId -
Returns:
true if the Expression part is a child of the given query BNF; false otherwise

isValidFragment

protected boolean isValidFragment(java.lang.String identifier,
                                  java.lang.String text)

isValidProposal

protected boolean isValidProposal(java.lang.String proposal,
                                  java.lang.String word)
Determines whether the given proposal is a valid, which is based on the content of the given word. If the word is not an empty string, the proposal must start with the content of the word.

Parameters:
proposal - The proposal to validate
word - The word, which is what was parsed before the position of the cursor
Returns:
true if the proposal is valid; false otherwise

isValidVersion

protected boolean isValidVersion(java.lang.String identifier)
Determines whether the given JPQL identifier can be a valid proposal, i.e. if it's part of the grammar of the JPA version that was used to parse the JPQL query.

Parameters:
identifier - The JPQL identifier to validate
Returns:
true if the given identifier is part of the current JPA version or was defined in previous release; false otherwise

isWithinInvalidExpression

protected boolean isWithinInvalidExpression(Expression expression)

prepare

public void prepare(QueryPosition queryPosition,
                    ContentAssistExtension extension)
Prepares this visitor by pre-populating it with the necessary data that is required to properly gather the list of proposals based on the caret position.

Parameters:
queryPosition - Contains the position of the cursor within the parsed Expression
extension - This extension can be used to provide additional support to JPQL content assist that is outside the scope of providing proposals related to JPA metadata. It adds support for providing suggestions related to class names, enum constants, table names, column names

registerHelper

protected final <T> void registerHelper(java.lang.Class<T> helperClass,
                                        T helper)
Registers the given helper associated with the given helper class.

Parameters:
helperClass - The Java class of the helper to retrieve
helper - The helper being registered
See Also:
getHelper(Class)

removeVirtualSpace

protected final void removeVirtualSpace()
Removes the last virtual space from the stack.


toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

virtualSpace

protected final int virtualSpace()
Returns the virtual space (which is equal to 1 character), if one was added to the stack or 0 if none is present.

Returns:
The size of the virtual space: 1 if present or 0 otherwise

visit

public void visit(AbsExpression expression)
Visits the AbsExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(AbstractSchemaName expression)
Visits the AbstractSchemaName expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(AdditionExpression expression)
Visits the AdditionExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(AllOrAnyExpression expression)
Visits the AllOrAnyExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(AndExpression expression)
Visits the AndExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(ArithmeticFactor expression)
Visits the ArithmeticFactor expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(AvgFunction expression)
Visits the AvgFunction expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(BadExpression expression)
Visits the BadExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(BetweenExpression expression)
Visits the BetweenExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(CaseExpression expression)
Visits the CaseExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(CoalesceExpression expression)
Visits the CoalesceExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(CollectionExpression expression)
Visits the CollectionExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(CollectionMemberDeclaration expression)
Visits the CollectionMemberDeclaration expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(CollectionMemberExpression expression)
Visits the CollectionMemberExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(CollectionValuedPathExpression expression)
Visits the CollectionValuedPathExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(ComparisonExpression expression)
Visits the ComparisonExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(ConcatExpression expression)
Visits the ConcatExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(ConstructorExpression expression)
Visits the ConstructorExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(CountFunction expression)
Visits the CountFunction expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(DateTime expression)
Visits the DateTime expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(DeleteClause expression)
Visits the DeleteClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(DeleteStatement expression)
Visits the DeleteStatement expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(DivisionExpression expression)
Visits the DivisionExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(EmptyCollectionComparisonExpression expression)
Visits the EmptyCollectionComparisonExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(EntityTypeLiteral expression)
Visits the EntityTypeLiteral expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(EntryExpression expression)
Visits the EntryExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(ExistsExpression expression)
Visits the ExistsExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

protected void visit(Expression expression)
Blindly visit the given Expression.

Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(FromClause expression)
Visits the FromClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(FunctionExpression expression)
Visits the FunctionExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(GroupByClause expression)
Visits the GroupByClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(HavingClause expression)
Visits the HavingClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(IdentificationVariable expression)
Visits the IdentificationVariable expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(IdentificationVariableDeclaration expression)
Visits the IdentificationVariableDeclaration expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(IndexExpression expression)
Visits the IndexExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(InExpression expression)
Visits the InExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(InputParameter expression)
Visits the InputParameter expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(Join expression)
Visits the Join expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(JPQLExpression expression)
Visits the JPQLExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(KeyExpression expression)
Visits the KeyExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(KeywordExpression expression)
Visits the KeywordExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(LengthExpression expression)
Visits the LengthExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(LikeExpression expression)
Visits the LikeExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(LocateExpression expression)
Visits the LocateExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(LowerExpression expression)
Visits the LowerExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(MaxFunction expression)
Visits the MaxFunction expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(MinFunction expression)
Visits the MinFunction expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(ModExpression expression)
Visits the ModExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(MultiplicationExpression expression)
Visits the MultiplicationExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(NotExpression expression)
Visits the NotExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(NullComparisonExpression expression)
Visits the NullComparisonExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(NullExpression expression)
Visits the NullExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(NullIfExpression expression)
Visits the NullIfExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(NumericLiteral expression)
Visits the NumericLiteral expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(ObjectExpression expression)
Visits the ObjectExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(OnClause expression)
Visits the OnClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(OrderByClause expression)
Visits the OrderByClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(OrderByItem expression)
Visits the OrderByItem expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(OrExpression expression)
Visits the OrExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(RangeVariableDeclaration expression)
Visits the RangeVariableDeclaration expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(ResultVariable expression)
Visits the ResultVariable expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SelectClause expression)
Visits the SelectClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SelectStatement expression)
Visits the SelectStatement expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SimpleFromClause expression)
Visits the SimpleFromClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SimpleSelectClause expression)
Visits the SimpleSelectClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SimpleSelectStatement expression)
Visits the SimpleSelectStatement expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SizeExpression expression)
Visits the SizeExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SqrtExpression expression)
Visits the SqrtExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(StateFieldPathExpression expression)
Visits the StateFieldPathExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(StringLiteral expression)
Visits the StringLiteral expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SubExpression expression)
Visits the SubExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SubstringExpression expression)
Visits the SubstringExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SubtractionExpression expression)
Visits the SubtractionExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(SumFunction expression)
Visits the SumFunction expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(TreatExpression expression)
Visits the TreatExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(TrimExpression expression)
Visits the TrimExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(TypeExpression expression)
Visits the TypeExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(UnknownExpression expression)
Visits the UnknownExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The UnknownExpression to visit

visit

public void visit(UpdateClause expression)
Visits the UpdateClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The UpdateClause to visit

visit

public void visit(UpdateItem expression)
Visits the UpdateItem expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The UpdateItem to visit

visit

public void visit(UpdateStatement expression)
Visits the UpdateStatement expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The UpdateStatement to visit

visit

public void visit(UpperExpression expression)
Visits the UpperExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The UpperExpression to visit

visit

public void visit(ValueExpression expression)
Visits the ValueExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The ValueExpression to visit

visit

public void visit(WhenClause expression)
Visits the WhenClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The WhenClause to visit

visit

public void visit(WhereClause expression)
Visits the WhereClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The WhereClause to visit

visitAggregateFunction

protected void visitAggregateFunction(AggregateFunction expression)

visitArithmeticExpression

protected void visitArithmeticExpression(ArithmeticExpression expression)

visitCollectionExpression

protected <T extends Expression> void visitCollectionExpression(T expression,
                                                                java.lang.String identifier,
                                                                AbstractContentAssistVisitor.CollectionExpressionHelper<T> helper)
Adds the possible proposals for the given expression based on the location of the cursor and the content of the expression.

Parameters:
expression - The expression being visited
identifier - The JPQL identifier of the Expression being visited, if the Expression does not have an identifier, than an empty string should be passed
helper - This helper completes the behavior of this method by retrieving the information from the given Expression

visitEncapsulatedExpression

protected void visitEncapsulatedExpression(AbstractEncapsulatedExpression expression,
                                           java.lang.String identifier,
                                           java.lang.String jpqlQueryBNF)
Adds the possible proposals for the given expression based on the location of the cursor and the content of the expression.

Parameters:
expression - The expression being visited
identifier -
jpqlQueryBNF -

visitEndingExpression

protected void visitEndingExpression(Expression expression)

visitEnumConstant

protected void visitEnumConstant(AbstractPathExpression expression)

visitInvalidExpression

protected void visitInvalidExpression(Expression expression)

visitLogicalExpression

protected void visitLogicalExpression(LogicalExpression expression,
                                      java.lang.String identifier)

visitParentVisitor

protected AbstractContentAssistVisitor.VisitParentVisitor visitParentVisitor()

visitPathExpression

protected void visitPathExpression(AbstractPathExpression expression)

visitPathExpression

protected void visitPathExpression(AbstractPathExpression expression,
                                   Filter<IMapping> filter)

visitSingleEncapsulatedExpression

protected void visitSingleEncapsulatedExpression(AbstractSingleEncapsulatedExpression expression,
                                                 AbstractContentAssistVisitor.IdentificationVariableType identificationVariableType)
Adds the possible proposals for the given expression based on the location of the cursor and the content of the expression.

Parameters:
expression - The expression being visited
identificationVariableType - The type of identification variables that can be added as possible proposals

visitSingleEncapsulatedExpression

protected void visitSingleEncapsulatedExpression(AbstractSingleEncapsulatedExpression expression,
                                                 AbstractContentAssistVisitor.IdentificationVariableType identificationVariableType,
                                                 java.lang.String... expressionIdentifiers)
Adds the possible proposals for the given expression based on the location of the cursor and the content of the expression.

Parameters:
expression - The expression being visited
identificationVariableType - The type of identification variables that can be added as possible proposals
expressionIdentifiers - Sometimes the expression may have more than one possible identifier, such as ALL, ANY and SOME are a possible JPQL identifier for a single expression (AllOrAnyExpression

visitStatement

protected <T extends Expression> void visitStatement(T expression,
                                                     AbstractContentAssistVisitor.StatementHelper<T> helper)
Visits the given AbstractSelectStatement and checks to see if the identifiers of the following clauses can be added a valid proposals.

Parameters:
expression -
helper - This helper handles one clause from the given SELECT statement

visitThirdPartyPathExpression

protected void visitThirdPartyPathExpression(AbstractPathExpression expression,
                                             java.lang.String variableName)

EclipseLink 2.5.0, build 'v20130312-9664d23' API Reference