|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
org.eclipse.persistence.jpa.jpql.AbstractContentAssistVisitor
public abstract class AbstractContentAssistVisitor
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.
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,AbstractContentAssistVisitor.CompoundTypeFilter> |
compoundTypeFilters
This map contains the filter that is used to determine when a compound identifier is a valid proposal, some of them depends on the expression's type. |
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<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 |
addAggregateIdentifier(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 |
addAggregateIdentifiers(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 |
addAggregateIdentifiers(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 |
addArithmeticIdentifiers()
Adds the JPQL identifiers which correspond to the arithmetic operators as valid proposals. |
|
protected void |
addClauseIdentifier(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 |
addClauseIdentifiers(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 |
addClauseIdentifiers(java.lang.String queryBNFId)
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 |
addComparisonIdentifiers()
Adds the JPQL identifiers which correspond to the comparison operators as valid proposals. |
|
protected void |
addCompositeIdentifier(java.lang.String identifier,
int offset)
Adds the composite JPQL identifier by following the given rules: If the word is empty and the offset is -1, then use the rule used by addIdentifier(String) ;
Otherwise checks the ending of the JPQL query with a portion of the identifier from the
entire length of the identifier to the given offset by cutting off the trailing characters. |
|
protected void |
addCompoundIdentifier(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 |
addCompoundIdentifiers(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 |
addCompoundIdentifiers(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 |
addEntities()
Adds the entities as possible content assist proposals but will be filtered using the current word. |
|
protected void |
addEntities(IType type)
Adds the entities as possible content assist proposals but will be filtered using the current word and the entity's type will have to be assignable from the given IType . |
|
protected void |
addExpressionFactoryIdentifiers(ExpressionFactory expressionFactory)
Adds the JPQL identifiers that were registered with the given ExpressionFactory . |
|
protected void |
addExpressionFactoryIdentifiers(java.lang.String expressionFactoryId)
Adds the JPQL identifiers that were registered with the ExpressionFactory with the
given unique identifier. |
|
protected void |
addFunctionIdentifier(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 |
addFunctionIdentifiers(Expression expression)
Adds the JPQL identifiers for which their role is FUNCTION by
determining the JPQLQueryBNF that represents the fragment for which the given Expression was parsed. |
|
protected void |
addFunctionIdentifiers(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 |
addFunctionIdentifiers(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 |
addIdentificationVariable(java.lang.String identificationVariable)
Adds the given identification variable as a valid proposal. |
|
protected void |
addIdentificationVariables()
Adds all the identification variables defined in the current query's FROM clause. |
|
protected void |
addIdentificationVariables(Expression expression,
AbstractContentAssistVisitor.IdentificationVariableType type)
Adds the possible identification 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 |
addJoinIdentifiers()
Adds the join specification identifiers as proposals. |
|
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 void |
addLogicalIdentifiers()
Adds the logical identifiers, which are AND and OR . |
|
protected void |
addRangeIdentificationVariable(java.lang.String identificationVariable)
Adds the given identification variable as a proposal if it passes the checks. |
|
protected void |
addResultVariables()
Adds the result variables defined in the SELECT clause as valid proposals. |
|
protected void |
addVirtualSpace()
Adds a virtual space on the stack. |
|
protected boolean |
areArithmeticSymbolsAppendable(Expression expression)
Determines whether the given Expression can be followed by an arithmetic operator. |
|
protected boolean |
areComparisonSymbolsAppendable(Expression expression)
Determines whether the given Expression can be followed by a comparison operator. |
|
protected boolean |
areLogicalSymbolsAppendable(Expression expression)
Determines whether the given Expression can be followed by a logical operator. |
|
protected AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper |
buildAbstractConditionalClauseCollectionHelper()
|
|
protected abstract AbstractContentAssistVisitor.AcceptableTypeVisitor |
buildAcceptableTypeVisitor()
|
|
protected AbstractContentAssistVisitor.AppendableExpressionVisitor |
buildAppendableExpressionVisitor()
|
|
protected AbstractContentAssistVisitor.CollectionExpressionVisitor |
buildCollectionExpressionVisitor()
|
|
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 invalidExpression,
Expression startingPointExpression,
boolean[] virtualSpace)
Creates a new QueryPosition containing the corrected positions starting at the given
Expression and traversing the children at is always at the right side of the tree. |
|
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 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.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. |
|
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 |
buildTrailingCompletenessVisitor()
|
|
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 of the internal data. |
|
protected RangeVariableDeclaration |
findRangeVariableDeclaration(UpdateClause expression)
Retrieves the RangeVariableDeclaration that defines the entity name and identification
variable for the given UpdateClause . |
|
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.CompoundExpressionHelper |
getCompoundExpressionHelper()
|
|
protected AbstractContentAssistVisitor.ConcatExpressionCollectionHelper |
getConcatExpressionCollectionHelper()
|
|
protected AbstractContentAssistVisitor.ConstrutorCollectionHelper |
getConstructorCollectionHelper()
|
|
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 AbstractContentAssistVisitor.EncapsulatedExpressionVisitor |
getEncapsulatedExpressionVisitor()
|
|
protected AbstractContentAssistVisitor.EndingQueryPositionBuilder |
getEndingQueryPositionBuilder()
|
|
protected AbstractContentAssistVisitor.EnumVisitor |
getEnumVisitor()
|
|
protected AbstractContentAssistVisitor.AcceptableTypeVisitor |
getExpressionTypeVisitor()
|
|
protected AbstractContentAssistVisitor.FollowingClausesVisitor |
getFollowingClausesVisitor()
|
|
protected AbstractContentAssistVisitor.FollowingInvalidExpressionVisitor |
getFollowingInvalidExpressionVisitor()
|
|
protected AbstractContentAssistVisitor.FromClauseCollectionHelper |
getFromClauseCollectionHelper()
|
|
protected AbstractContentAssistVisitor.FromClauseStatementHelper |
getFromClauseStatementHelper()
|
|
protected AbstractContentAssistVisitor.GroupByClauseCollectionHelper |
getGroupByClauseCollectionHelper()
|
|
protected AbstractContentAssistVisitor.GroupByClauseStatementHelper |
getGroupByClauseStatementHelper()
|
|
protected AbstractContentAssistVisitor.HavingClauseStatementHelper |
getHavingClauseStatementHelper()
|
|
protected
|
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 AbstractContentAssistVisitor.CompletenessVisitor |
getIncompleteCollectionExpressionVisitor()
|
|
protected AbstractContentAssistVisitor.InvalidExpressionVisitor |
getInvalidExpressionVisitor()
|
|
protected AbstractContentAssistVisitor.JoinCollectionHelper |
getJoinCollectionHelper()
|
|
protected Filter<IMapping> |
getMappingCollectionFilter()
|
|
protected AbstractContentAssistVisitor.MappingFilterBuilder |
getMappingFilterBuilder()
|
|
protected Filter<IMapping> |
getMappingPropertyFilter()
|
|
protected AbstractContentAssistVisitor.NotExpressionVisitor |
getNotExpressionVisitor()
|
|
protected AbstractContentAssistVisitor.OrderByClauseCollectionHelper |
getOrderByClauseCollectionHelper()
|
|
protected AbstractContentAssistVisitor.OrderByClauseStatementHelper |
getOrderByClauseStatementHelper()
|
|
protected JPQLQueryBNF |
getQueryBNF(java.lang.String queryBNFId)
Retrieves the JPQLQueryBNF that was registered for the given unique identifier. |
|
protected AbstractContentAssistVisitor.RangeVariableDeclarationVisitor |
getRangeVariableDeclarationVisitor()
|
|
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.TrailingCompletenessVisitor |
getTrailingCompletenessVisitor()
|
|
protected AbstractContentAssistVisitor.TripleEncapsulatedCollectionHelper |
getTripleEncapsulatedCollectionHelper()
|
|
protected AbstractContentAssistVisitor.UpdateClauseStatementHelper |
getUpdateClauseStatementHelper()
|
|
protected AbstractContentAssistVisitor.UpdateItemCollectionHelper |
getUpdateItemCollectionHelper()
|
|
protected AbstractContentAssistVisitor.VisitParentVisitor |
getVisitParentVisitor()
|
|
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 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 a certain type of JPQL identifiers can be appended to the JPQL query based on 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 the identifiers identifying clauses can be appended to the JPQL query based on the given Expression . |
|
protected boolean |
isComplete(Expression expression)
Determines whether the given Expression is complete or not. |
|
protected boolean |
isCompoundable(Expression expression)
Determines whether the given Expression can be used as the left side of a compound
expression. |
|
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)
Determines whether the given AbstractPathExpression is found within a declaration expression. |
|
protected boolean |
isEncapsulated(Expression expression)
Determines whether the given Expression is being encapsulated or not. |
|
protected boolean |
isEnumAllowed(AbstractPathExpression expression)
Determines whether the given AbstractPathExpression could potentially represent a
fully qualified enum constant, which is dictated by the location of the path expression within
the query. |
|
protected boolean |
isFollowingInvalidExpression(Expression expression)
Determines whether the given Expression is preceded by an invalid expression. |
|
protected boolean |
isFunction(java.lang.String identifier)
Determines whether the given JPQL identifier is a function, an example would be AVG. |
|
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)
Determines whether the given Expression represents an invalid fragment. |
|
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)
Determines whether the given Expression represents the negated expression. |
|
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 |
isSubqueryAppendable(Expression expression)
Determines whether the JPQL identifier starting a subquery ( SELECT ) can
be appended based on the given Expression which is preceding the position of the cursor. |
|
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 JPQLQueryBNF part is the given parent JPQLQueryBNF . |
|
protected boolean |
isValid(JPQLQueryBNF parentQueryBNF,
JPQLQueryBNF queryBNF,
boolean bypassCompound)
Determines whether the given JPQLQueryBNF part is the given parent JPQLQueryBNF . |
|
protected boolean |
isValid(JPQLQueryBNF parentQueryBNF,
java.lang.String queryBNFId,
boolean bypassCompound)
Determines whether the given JPQLQueryBNF part is the given parent JPQLQueryBNF . |
|
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)
Determines whether the given Expression is part of an invalid fragment |
|
protected
|
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()
|
|
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)
Visits the given AggregateFunction and attempts to find valid proposals. |
|
protected void |
visitArithmeticExpression(ArithmeticExpression expression)
Visits the given ArithmeticExpression and attempts to find valid proposals. |
|
protected
|
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 |
visitEndingExpression(Expression expression)
|
|
protected void |
visitInvalidExpression(Expression expression)
|
|
protected void |
visitLogicalExpression(LogicalExpression expression)
Visits the given LogicalExpression and attempts to find valid proposals. |
|
protected void |
visitPathExpression(AbstractPathExpression expression)
Visits the given AbstractPathExpression and attempts to find valid proposals. |
|
protected void |
visitPathExpression(AbstractPathExpression expression,
Filter<IMapping> filter)
Visits the given AbstractPathExpression by attempting to resolve the path. |
|
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
|
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)
Visits the given AbstractPathExpression and attempts to find valid proposals that is
not provided by the default implementation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.String,AbstractContentAssistVisitor.CompoundTypeFilter> compoundTypeFilters
protected java.util.Stack<java.lang.Integer> corrections
protected java.util.Map<java.lang.Class<?>,java.lang.Object> helpers
protected java.util.Stack<Expression> lockedExpressions
protected DefaultContentAssistProposals proposals
protected final JPQLQueryContext queryContext
protected QueryPosition queryPosition
Expression
from the root node
up to the deepest leaf node.
protected java.util.Stack<java.lang.Integer> virtualSpaces
protected java.lang.String word
protected WordParser wordParser
protected static final int SPACE_LENGTH
Constructor Detail |
---|
protected AbstractContentAssistVisitor(JPQLQueryContext queryContext)
AbstractContentAssistVisitor
.
queryContext
- The context used to query information about the JPQL query
java.lang.NullPointerException
- The JPQLQueryContext
cannot be null
Method Detail |
---|
protected void addAggregateIdentifier(java.lang.String identifier)
IdentifierRole.AGGREGATE
and the beginning starts with the current word.
identifier
- The JPQL identifier to add as a valid proposal if it passes the checksprotected void addAggregateIdentifiers(JPQLQueryBNF queryBNF)
JPQLQueryBNF
as valid
proposals if their role is IdentifierRole.AGGREGATE
and the beginning starts with the
current word.
queryBNF
- The JPQLQueryBNF
for which the registered JPQL identifiers will be
added as proposals if they pass the checksprotected void addAggregateIdentifiers(java.lang.String queryBNFId)
JPQLQueryBNF
as valid
proposals if their role is IdentifierRole.AGGREGATE
and the beginning starts with the
current word.
queryBNFId
- The unique of the JPQLQueryBNF
for which the registered JPQL
identifiers will be added as proposals if they pass the checksprotected void addArithmeticIdentifiers()
protected void addClauseIdentifier(java.lang.String identifier)
IdentifierRole.CLAUSE
and the beginning starts with the current word.
identifier
- The JPQL identifier to add as a valid proposal if it passes the checksprotected void addClauseIdentifiers(JPQLQueryBNF queryBNF)
JPQLQueryBNF
as valid
proposals if their role is IdentifierRole.CLAUSE
and the beginning starts with the
current word.
queryBNF
- The JPQLQueryBNF
for which the registered JPQL identifiers will be
added as proposals if they pass the checksprotected void addClauseIdentifiers(java.lang.String queryBNFId)
JPQLQueryBNF
as valid
proposals if their role is IdentifierRole.CLAUSE
and the beginning starts with the
current word.
queryBNFId
- The unique identifier of the JPQLQueryBNF
for which the registered
JPQL identifiers will be
added as proposals if they pass the checksprotected void addComparisonIdentifiers()
protected void addCompositeIdentifier(java.lang.String identifier, int offset)
addIdentifier(String)
;
identifier
- The composite JPQL identifier to add as valid proposal. The composite part
means it is an identifier composed of more than one word, example: GROUP BY
offset
- The smallest length of the given identifier to test against the ending of the
JPQL query based on the position of the cursor. The offset is exclusiveprotected void addCompoundIdentifier(java.lang.String identifier, Expression expression, boolean hasIs, boolean hasNot)
IdentifierRole.COMPOUND_FUNCTION
and the beginning starts with the current word.
identifier
- The JPQL identifier to add as a valid proposal if it passes the checksexpression
- The Expression
represents the fragment that is before the current
word and it helps to filter out some of the compound identifiershasIs
- Flag indicating if the IS
identifier was found before the word,
which would also be before the NOT
identifier if it was also foundhasNot
- Flag indicating if the NOT
identifier was found before the wordprotected void addCompoundIdentifiers(JPQLQueryBNF queryBNF, Expression expression, boolean hasIs, boolean hasNot)
JPQLQueryBNF
as valid
proposals if their role is IdentifierRole.COMPOUND_FUNCTION
and the beginning starts
with the current word.
queryBNF
- The JPQLQueryBNF
for which the registered JPQL identifiers will be
added as proposals if they pass the checksexpression
- The Expression
represents the fragment that is before the current
word and it helps to filter out some of the compound identifiershasIs
- Flag indicating if the IS
identifier was found before the word,
which would also be before the NOT
identifier if it was also foundhasNot
- Flag indicating if the NOT
identifier was found before the wordprotected void addCompoundIdentifiers(java.lang.String queryBNFId, Expression expression, boolean hasIs, boolean hasNot)
JPQLQueryBNF
as valid
proposals if their role is IdentifierRole.COMPOUND_FUNCTION
and the beginning starts
with the current word.
queryBNFId
- The unique identifier of the JPQLQueryBNF
for which the registered
JPQL identifiers will be added as proposals if they pass the checksexpression
- The Expression
represents the fragment that is before the current
word and it helps to filter out some of the compound identifiershasIs
- Flag indicating if the IS
identifier was found before the word,
which would also be before the NOT
identifier if it was also foundhasNot
- Flag indicating if the NOT
identifier was found before the wordprotected void addEntities()
protected void addEntities(IType type)
IType
.
type
- The IType
used to filter the abstract schema typesprotected void addExpressionFactoryIdentifiers(ExpressionFactory expressionFactory)
ExpressionFactory
.
expressionFactory
- The factory for which its registered JPQL identifiers are added as
valid proposals, if they meet the checksprotected void addExpressionFactoryIdentifiers(java.lang.String expressionFactoryId)
ExpressionFactory
with the
given unique identifier.
expressionFactoryId
- The unique identifier of the factory for which its registered JPQL
identifiers are added as valid proposals, if they meet the checksprotected void addFunctionIdentifier(java.lang.String identifier)
IdentifierRole.FUNCTION
and the beginning starts with the current word.
identifier
- The JPQL identifier to add as a valid proposal if it passes the checksprotected void addFunctionIdentifiers(Expression expression)
FUNCTION
by
determining the JPQLQueryBNF
that represents the fragment for which the given Expression
was parsed.
For instance: "SELECT e, AVG(e.name) FROM Employee e
" and the given expression is
"AVG(e.name)
", then the BNF should be the select item BNF.
If the BNF allows for a subquery and the expression is encapsulated by parenthesis, then
SELECT
will also be added.
The identification variables will also be added.
expression
- The Expression
is used to determine the JPQLQueryBNF
to use
when retrieving the JPQL identifiers representing a functionprotected void addFunctionIdentifiers(JPQLQueryBNF queryBNF)
JPQLQueryBNF
as valid
proposals if their role is IdentifierRole.FUNCTION
and the beginning starts with the
current word.
queryBNF
- The JPQLQueryBNF
for which the registered JPQL identifiers will be
added as proposals if they pass the checksprotected void addFunctionIdentifiers(java.lang.String queryBNFId)
JPQLQueryBNF
as valid
proposals if their role is IdentifierRole.FUNCTION
and the beginning starts with the
current word.
queryBNFId
- The unique identifier of the JPQLQueryBNF
for which the registered
JPQL identifiers will be added as proposals if they pass the checksprotected void addIdentificationVariable(java.lang.String identificationVariable)
identificationVariable
- The identification variable to add as a proposal if it passes the checksprotected void addIdentificationVariables()
protected void addIdentificationVariables(Expression expression, AbstractContentAssistVisitor.IdentificationVariableType 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.
expression
- The Expression
where the content assist was invoked, which helps to
determine how to stop adding identification variablestype
- Which type of identification variables to add as valid proposalsprotected void addIdentifier(java.lang.String identifier)
identifier
- The JPQL identifier to add as a proposalprotected void addJoinIdentifiers()
protected void addLeftIdentificationVariables(Expression expression)
Expression
.
expression
- The Expression
used to determine at which declaration to stopprotected void addLogicalIdentifiers()
AND
and OR
.
protected void addRangeIdentificationVariable(java.lang.String identificationVariable)
identificationVariable
- An identification variable that isprotected void addResultVariables()
SELECT
clause as valid proposals.
protected final void addVirtualSpace()
protected boolean areArithmeticSymbolsAppendable(Expression expression)
Expression
can be followed by an arithmetic operator.
expression
- The Expression
that found left of the cursor, which determines if
the arithmetic operators are appendable or not
true
if the operators are appendable; false
otherwiseprotected boolean areComparisonSymbolsAppendable(Expression expression)
Expression
can be followed by a comparison operator.
expression
- The Expression
that found left of the cursor, which determines if
the comparison operators are appendable or not
true
if the operators are appendable; false
otherwiseprotected boolean areLogicalSymbolsAppendable(Expression expression)
Expression
can be followed by a logical operator.
expression
- The Expression
that found left of the cursor, which determines if
the logical operators are appendable or not
true
if the logical identifiers are appendable; false
otherwiseprotected AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper buildAbstractConditionalClauseCollectionHelper()
protected abstract AbstractContentAssistVisitor.AcceptableTypeVisitor buildAcceptableTypeVisitor()
protected AbstractContentAssistVisitor.AppendableExpressionVisitor buildAppendableExpressionVisitor()
protected AbstractContentAssistVisitor.CollectionExpressionVisitor buildCollectionExpressionVisitor()
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 invalidExpression, Expression startingPointExpression, boolean[] virtualSpace)
QueryPosition
containing the corrected positions starting at the given
Expression
and traversing the children at is always at the right side of the tree.
invalidExpression
- The invalid Expression
for which a new QueryPosition
will be calculatedstartingPointExpression
- The Expression
from which the calculation of the positions will startvirtualSpace
- Single element array that will be used to store the flag indicating if a
virtual space should be added or not
QueryPosition
that contains the position of the cursor starting from
the given Expression
down to the right leafprotected 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)
AbstractValidator.JPQLQueryBNFValidator
that can be used to validate an Expression
by making sure its BNF is part of the given BNF.
queryBNF
- The BNF used to determine the validity of an Expression
AbstractValidator.JPQLQueryBNFValidator
that can determine if an Expression
follows
the given BNFprotected 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.OrderByClauseCollectionHelper buildOrderByClauseCollectionHelper()
protected AbstractContentAssistVisitor.OrderByClauseStatementHelper buildOrderByClauseStatementHelper()
protected AbstractContentAssistVisitor.PropertyMappingFilter buildPropertyMappingFilter()
public ContentAssistProposals buildProposals(int position)
position
- The position of the cursor within the JPQL query
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 buildTrailingCompletenessVisitor()
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()
public void dispose()
protected RangeVariableDeclaration findRangeVariableDeclaration(UpdateClause expression)
RangeVariableDeclaration
that defines the entity name and identification
variable for the given UpdateClause
.
RangeVariableDeclaration
if the JPQL query defines it or null
if it was not definedprotected AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper getAbstractConditionalClauseCollectionHelper()
protected IType getAcceptableType(Expression expression)
IType
that any type should be assignable. If the IType
is
Number
, than any subclasses will be allowed.
expression
- The Expression
to visit, including its parent hierarchy until an
Expression
requires a certain IType
IType
allowed or null
if anything is allowedprotected AbstractContentAssistVisitor.AppendableExpressionVisitor getAppendableExpressionVisitor()
protected CollectionExpression getCollectionExpression(Expression expression)
Expression
to a CollectionExpression
if it is actually an
object of that type.
expression
- The Expression
to cast
Expression
if it is a CollectionExpression
or null
if it is any other objectprotected AbstractContentAssistVisitor.CollectionExpressionVisitor getCollectionExpressionVisitor()
CollectionExpression
if it's been visited.
AbstractContentAssistVisitor.CollectionExpressionVisitor
buildCollectionExpressionVisitor()
protected AbstractContentAssistVisitor.CompoundExpressionHelper getCompoundExpressionHelper()
protected AbstractContentAssistVisitor.ConcatExpressionCollectionHelper getConcatExpressionCollectionHelper()
protected AbstractContentAssistVisitor.ConstrutorCollectionHelper getConstructorCollectionHelper()
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 AbstractContentAssistVisitor.EncapsulatedExpressionVisitor getEncapsulatedExpressionVisitor()
protected AbstractContentAssistVisitor.EndingQueryPositionBuilder getEndingQueryPositionBuilder()
protected AbstractContentAssistVisitor.EnumVisitor getEnumVisitor()
protected AbstractContentAssistVisitor.AcceptableTypeVisitor getExpressionTypeVisitor()
protected AbstractContentAssistVisitor.FollowingClausesVisitor getFollowingClausesVisitor()
protected AbstractContentAssistVisitor.FollowingInvalidExpressionVisitor getFollowingInvalidExpressionVisitor()
protected AbstractContentAssistVisitor.FromClauseCollectionHelper getFromClauseCollectionHelper()
protected AbstractContentAssistVisitor.FromClauseStatementHelper getFromClauseStatementHelper()
protected AbstractContentAssistVisitor.GroupByClauseCollectionHelper getGroupByClauseCollectionHelper()
protected AbstractContentAssistVisitor.GroupByClauseStatementHelper getGroupByClauseStatementHelper()
protected AbstractContentAssistVisitor.HavingClauseStatementHelper getHavingClauseStatementHelper()
protected final <T> T getHelper(java.lang.Class<T> helperClass)
helperClass
- The Java class of the helper to retrieve
protected IdentifierRole getIdentifierRole(java.lang.String identifier)
identifier
- The identifier for which its role is requested
protected AbstractContentAssistVisitor.CompletenessVisitor getIncompleteCollectionExpressionVisitor()
protected AbstractContentAssistVisitor.InvalidExpressionVisitor getInvalidExpressionVisitor()
protected AbstractContentAssistVisitor.JoinCollectionHelper getJoinCollectionHelper()
protected Filter<IMapping> getMappingCollectionFilter()
protected AbstractContentAssistVisitor.MappingFilterBuilder getMappingFilterBuilder()
protected Filter<IMapping> getMappingPropertyFilter()
protected AbstractContentAssistVisitor.NotExpressionVisitor getNotExpressionVisitor()
protected AbstractContentAssistVisitor.OrderByClauseCollectionHelper getOrderByClauseCollectionHelper()
protected AbstractContentAssistVisitor.OrderByClauseStatementHelper getOrderByClauseStatementHelper()
protected JPQLQueryBNF getQueryBNF(java.lang.String queryBNFId)
JPQLQueryBNF
that was registered for the given unique identifier.
queryBNFId
- The unique identifier of the JPQLQueryBNF
to retrieve
JPQLQueryBNF
representing a section of the grammarprotected AbstractContentAssistVisitor.RangeVariableDeclarationVisitor getRangeVariableDeclarationVisitor()
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.TrailingCompletenessVisitor getTrailingCompletenessVisitor()
protected AbstractContentAssistVisitor.TripleEncapsulatedCollectionHelper getTripleEncapsulatedCollectionHelper()
protected AbstractContentAssistVisitor.UpdateClauseStatementHelper getUpdateClauseStatementHelper()
protected AbstractContentAssistVisitor.UpdateItemCollectionHelper getUpdateItemCollectionHelper()
protected AbstractContentAssistVisitor.VisitParentVisitor getVisitParentVisitor()
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 final boolean hasVirtualSpace()
true
if there is a virtual space to count as a real one or notprotected void initialize()
protected boolean isAggregate(java.lang.String identifier)
identifier
- The identifier to validate
true
if the given identifier is used in an aggregate expression;
false
otherwiseprotected boolean isAppendable(Expression expression, AbstractContentAssistVisitor.AppendableType appendableType)
Expression
.
expression
- The Expression
that determines what can be appendedappendableType
- The type of identifiers to append to the JPQL query
true
if the JPQL identifiers with the given type can be appended to the
JPQL query; false
if they cannotprotected boolean isAppendableToCollection(Expression expression)
expression
-
protected boolean isClause(java.lang.String identifier)
identifier
- The identifier to validate
true
if the given identifier is a clause; false
otherwiseprotected boolean isClauseAppendable(Expression expression)
Expression
.
expression
- The Expression
that determines what can be appended
true
if the following clauses can be appended to the JPQL query;
false
if they cannotprotected boolean isComplete(Expression expression)
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.
expression
- The Expression
to visit
true
if the Expression
is well formed grammatically; false
if it's incompleteprotected boolean isCompoundable(Expression expression)
Expression
can be used as the left side of a compound
expression.
expression
- The Expression
that determines if the JPQL identifiers with
IdentifierRole.COMPOUND_FUNCTION
can be used to create a compound expression
true
if the compound identifiers can be appended to the JPQL query;
false
if they cannotprotected boolean isCompoundFunction(java.lang.String identifier)
identifier
- The identifier to validate
true
if the given identifier is used in a compound expression;
false
otherwiseprotected boolean isDeclaration(AbstractPathExpression expression)
AbstractPathExpression
is found within a declaration expression.
expression
- The AbstractPathExpression
to visit
true
if the visited CollectionValuedPathExpression
is owned by
a RangeVariableDeclaration
, which indicates it is used to define the "root" object;
false
if it is notprotected boolean isEncapsulated(Expression expression)
Expression
is being encapsulated or not.
expression
- The Expression
to scan for encapsulation
true
if the given Expression
is within parenthesis;
false
otherwiseprotected boolean isEnumAllowed(AbstractPathExpression expression)
AbstractPathExpression
could potentially represent a
fully qualified enum constant, which is dictated by the location of the path expression within
the query. Only a few location allows an enum constant.
expression
- The AbstractPathExpression
to visit
true
if the path expression represents a enum constant;
false
otherwiseprotected boolean isFollowingInvalidExpression(Expression expression)
Expression
is preceded by an invalid expression.
expression
- The Expression
to visit
true
if the visited Expression
is part of a collection of
expressions and an invalid expression precede it; false
otherwiseprotected boolean isFunction(java.lang.String identifier)
identifier
- The identifier to validate
true
if the given identifier is a function; false
otherwiseprotected boolean isInSubquery(Expression expression)
Expression
is in a subquery or in the top-level query.
expression
- The Expression
to visit its parent hierarchy
true
if the owning query is a subquery; false
if it's the
top-level queryprotected boolean isInvalidExpression(Expression expression)
Expression
represents an invalid fragment.
expression
- The Expression
to visit
true
if the Expression
is an invalid fragment;
false
otherwiseprotected abstract boolean isJoinFetchIdentifiable()
JOIN FETCH
expression can be identified by with an
identification variable or not.
true
if the expression can have an identification variable;
false
otherwiseprotected boolean isLocked(Expression expression)
Expression
has been set has the lock to prevent an
infinite recursion.
expression
- The Expression
to check if it is locked
true
if the given Expression
has been marked as locked;
false
otherwiseprotected boolean isNotExpression(Expression expression)
Expression
represents the negated expression.
expression
- The Expression
to visit
true
if the Expression
is NotExpression
;
false
otherwiseprotected boolean isPositionWithin(int position, int offset, java.lang.String 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
position
- The position of the cursoroffset
- The offset to adjust the positionword
- The word to check if the cursor is positioned in it
true
if the given position is within the given word;
false
otherwiseprotected boolean isPositionWithin(int position, java.lang.String 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
position
- The position of the cursorword
- The word to check if the cursor is positioned in it
true
if the given position is within the given word;
false
otherwiseprotected boolean isSubqueryAppendable(Expression expression)
SELECT
) can
be appended based on the given Expression
which is preceding the position of the cursor.
expression
- The Expression
that precedes the position of the cursor
true
if a subquery can be appended; false
otherwiseprotected boolean isValid(Expression expression, JPQLQueryBNF queryBNF)
Expression
part is an expression of the given query BNF.
expression
- The Expression
to validate based on the query BNFqueryBNF
-
true
if the Expression
part is a child of the given query BNF;
false
otherwiseprotected boolean isValid(Expression expression, java.lang.String queryBNFId)
Expression
part is an expression of the given query BNF.
expression
- The Expression
to validate based on the query BNFqueryBNFId
-
true
if the Expression
part is a child of the given query BNF;
false
otherwiseprotected boolean isValid(JPQLQueryBNF parentQueryBNF, JPQLQueryBNF queryBNF)
JPQLQueryBNF
part is the given parent JPQLQueryBNF
.
parentQueryBNF
- The "root" of the BNF used to determine if the other is a descendantqueryBNF
- The BNF to check if it is a descendant of the parent
true
if the JPQLQueryBNF
is a descendant of the given parent
JPQLQueryBNF
; false
otherwiseprotected boolean isValid(JPQLQueryBNF parentQueryBNF, JPQLQueryBNF queryBNF, boolean bypassCompound)
JPQLQueryBNF
part is the given parent JPQLQueryBNF
.
parentQueryBNF
- The "root" of the BNF used to determine if the other is a descendantqueryBNF
- The BNF to check if it is a descendant of the parentbypassCompound
- Indicates whether a JPQLQueryBNF
representing a compound
expression should be considered when doing the validation
true
if the JPQLQueryBNF
is a descendant of the given parent
JPQLQueryBNF
; false
otherwiseprotected boolean isValid(JPQLQueryBNF parentQueryBNF, java.lang.String queryBNFId, boolean bypassCompound)
JPQLQueryBNF
part is the given parent JPQLQueryBNF
.
parentQueryBNF
- The "root" of the BNF used to determine if the other is a descendantqueryBNFId
- The unique identifier of the JPQLQueryBNF
to check if it is a
descendant of the parentbypassCompound
- Indicates whether a JPQLQueryBNF
representing a compound
expression should be considered when doing the validation
true
if the JPQLQueryBNF
is a descendant of the given parent
JPQLQueryBNF
; false
otherwiseprotected boolean isValidProposal(java.lang.String proposal, java.lang.String word)
proposal
- The proposal to validateword
- The word, which is what was parsed before the position of the cursor
true
if the proposal is valid; false
otherwiseprotected boolean isValidVersion(java.lang.String identifier)
identifier
- The JPQL identifier to validate
true
if the given identifier is part of the current JPA version or was
defined in previous release; false
otherwiseprotected boolean isWithinInvalidExpression(Expression expression)
Expression
is part of an invalid fragment
expression
- The Expression
to verify its location within the JPQL query
true
if the given Expression
is within an invalid fragment;
false
if it is notprotected final <T> void registerHelper(java.lang.Class<T> helperClass, T helper)
helperClass
- The Java class of the helper to retrievehelper
- The helper being registeredgetHelper(Class)
protected final void removeVirtualSpace()
public java.lang.String toString()
toString
in class java.lang.Object
public void visit(AbsExpression expression)
AbsExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(AbstractSchemaName expression)
AbstractSchemaName
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(AdditionExpression expression)
AdditionExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(AllOrAnyExpression expression)
AllOrAnyExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(AndExpression expression)
AndExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(ArithmeticFactor expression)
ArithmeticFactor
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(AvgFunction expression)
AvgFunction
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(BadExpression expression)
BadExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(BetweenExpression expression)
BetweenExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(CaseExpression expression)
CaseExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(CoalesceExpression expression)
CoalesceExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(CollectionExpression expression)
CollectionExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(CollectionMemberDeclaration expression)
CollectionMemberDeclaration
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(CollectionMemberExpression expression)
CollectionMemberExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(CollectionValuedPathExpression expression)
CollectionValuedPathExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(ComparisonExpression expression)
ComparisonExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(ConcatExpression expression)
ConcatExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(ConstructorExpression expression)
ConstructorExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(CountFunction expression)
CountFunction
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(DateTime expression)
DateTime
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(DeleteClause expression)
DeleteClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(DeleteStatement expression)
DeleteStatement
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(DivisionExpression expression)
DivisionExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(EmptyCollectionComparisonExpression expression)
EmptyCollectionComparisonExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(EntityTypeLiteral expression)
EntityTypeLiteral
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(EntryExpression expression)
EntryExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(ExistsExpression expression)
ExistsExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitprotected void visit(Expression expression)
Expression
.
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(FromClause expression)
FromClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(FunctionExpression expression)
FunctionExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(GroupByClause expression)
GroupByClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(HavingClause expression)
HavingClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(IdentificationVariable expression)
IdentificationVariable
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(IdentificationVariableDeclaration expression)
IdentificationVariableDeclaration
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(IndexExpression expression)
IndexExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(InExpression expression)
InExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(InputParameter expression)
InputParameter
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(Join expression)
Join
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(JPQLExpression expression)
JPQLExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(KeyExpression expression)
KeyExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(KeywordExpression expression)
KeywordExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(LengthExpression expression)
LengthExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(LikeExpression expression)
LikeExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(LocateExpression expression)
LocateExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(LowerExpression expression)
LowerExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(MaxFunction expression)
MaxFunction
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(MinFunction expression)
MinFunction
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(ModExpression expression)
ModExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(MultiplicationExpression expression)
MultiplicationExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(NotExpression expression)
NotExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(NullComparisonExpression expression)
NullComparisonExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(NullExpression expression)
NullExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(NullIfExpression expression)
NullIfExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(NumericLiteral expression)
NumericLiteral
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(ObjectExpression expression)
ObjectExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(OnClause expression)
OnClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(OrderByClause expression)
OrderByClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(OrderByItem expression)
OrderByItem
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(OrExpression expression)
OrExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(RangeVariableDeclaration expression)
RangeVariableDeclaration
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(ResultVariable expression)
ResultVariable
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SelectClause expression)
SelectClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SelectStatement expression)
SelectStatement
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SimpleFromClause expression)
SimpleFromClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SimpleSelectClause expression)
SimpleSelectClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SimpleSelectStatement expression)
SimpleSelectStatement
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SizeExpression expression)
SizeExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SqrtExpression expression)
SqrtExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(StateFieldPathExpression expression)
StateFieldPathExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(StringLiteral expression)
StringLiteral
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SubExpression expression)
SubExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SubstringExpression expression)
SubstringExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SubtractionExpression expression)
SubtractionExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(SumFunction expression)
SumFunction
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(TreatExpression expression)
TreatExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(TrimExpression expression)
TrimExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(TypeExpression expression)
TypeExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visitpublic void visit(UnknownExpression expression)
UnknownExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The UnknownExpression
to visitpublic void visit(UpdateClause expression)
UpdateClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The UpdateClause
to visitpublic void visit(UpdateItem expression)
UpdateItem
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The UpdateItem
to visitpublic void visit(UpdateStatement expression)
UpdateStatement
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The UpdateStatement
to visitpublic void visit(UpperExpression expression)
UpperExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The UpperExpression
to visitpublic void visit(ValueExpression expression)
ValueExpression
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The ValueExpression
to visitpublic void visit(WhenClause expression)
WhenClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The WhenClause
to visitpublic void visit(WhereClause expression)
WhereClause
expression.
visit
in interface ExpressionVisitor
visit
in class AnonymousExpressionVisitor
expression
- The WhereClause
to visitprotected void visitAggregateFunction(AggregateFunction expression)
AggregateFunction
and attempts to find valid proposals.
expression
- The AggregateFunction
to inspectprotected void visitArithmeticExpression(ArithmeticExpression expression)
ArithmeticExpression
and attempts to find valid proposals.
expression
- The ArithmeticExpression
to inspectprotected <T extends Expression> void visitCollectionExpression(T expression, java.lang.String identifier, AbstractContentAssistVisitor.CollectionExpressionHelper<T> helper)
expression
based on the location of
the cursor and the content of the expression.
expression
- The expression
being visitedidentifier
- The JPQL identifier of the Expression
being visited, if the Expression
does not have an identifier, than an empty string should be passedhelper
- This helper completes the behavior of this method by retrieving the information
from the given Expression
protected void visitEndingExpression(Expression expression)
protected void visitInvalidExpression(Expression expression)
protected void visitLogicalExpression(LogicalExpression expression)
LogicalExpression
and attempts to find valid proposals.
expression
- The LogicalExpression
to inspectprotected void visitPathExpression(AbstractPathExpression expression)
AbstractPathExpression
and attempts to find valid proposals.
Note: A path expression can represent many things: state field, relationship field, collection field, enum constant, etc. This will consider all variations.
expression
- The AbstractPathExpression
to inspectprotected void visitPathExpression(AbstractPathExpression expression, Filter<IMapping> filter)
AbstractPathExpression
by attempting to resolve the path.
expression
- The AbstractPathExpression
to inspectfilter
- The Filter
is used to filter out IMapping
that are not valid
based on their type and the type that is allowedprotected void visitSingleEncapsulatedExpression(AbstractSingleEncapsulatedExpression expression, AbstractContentAssistVisitor.IdentificationVariableType identificationVariableType)
expression
based on the location of the cursor and the content of the expression.
expression
- The expression
being visitedidentificationVariableType
- The type of identification variables that can be added as
possible proposalsprotected void visitSingleEncapsulatedExpression(AbstractSingleEncapsulatedExpression expression, AbstractContentAssistVisitor.IdentificationVariableType identificationVariableType, java.lang.String... expressionIdentifiers)
expression
based on the location of the cursor and the content of the expression.
expression
- The expression
being visitedidentificationVariableType
- The type of identification variables that can be added as
possible proposalsexpressionIdentifiers
- 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
protected <T extends Expression> void visitStatement(T expression, AbstractContentAssistVisitor.StatementHelper<T> helper)
AbstractSelectStatement
and checks to see if the identifiers of the
following clauses can be added a valid proposals.
expression
- helper
- This helper handles one clause from the given SELECT
statementprotected void visitThirdPartyPathExpression(AbstractPathExpression expression, java.lang.String variableName)
AbstractPathExpression
and attempts to find valid proposals that is
not provided by the default implementation. Subclasses can add additional proposals that is
outside of the scope of generic JPA metadata.
expression
- The AbstractPathExpression
to inspectvariableName
- The beginning of the path expression
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |