protected static class AbstractContentAssistVisitor.IncompleteCollectionExpressionVisitor extends AbstractExpressionVisitor
Example: SELECT e FROM Employee e GROUP B
In this example, the FROM
clause contains a collection of two
identification variable declarations, in a valid query, it would be separated by a comma, but
this one just means it's incomplete and "GROUP B" is the beginning of the GROUP BY
clause.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
clause
The clause being visited, which is marked by its JPQL identifier.
|
protected boolean |
complete
Determines whether an
Expression that was visited is complete or if some part is missing. |
protected boolean |
insideCollection
This flag is used to make sure only the last expression in a collection is tested.
|
Modifier | Constructor and Description |
---|---|
protected |
IncompleteCollectionExpressionVisitor() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.lang.String> |
compositeIdentifiersAfter(java.lang.String afterIdentifier)
Returns the list of identifiers for the clauses following the given identifier.
|
void |
dispose()
Disposes of the internal data.
|
boolean |
isComplete()
Determines whether an
Expression that was visited is complete or if some part is missing. |
protected boolean |
isPossibleCompositeIdentifier(java.lang.String clause,
java.lang.String fragment)
Determines whether the given JPQL fragment, which is the parsed text of the expression
invalid collection expression or the portion of it based on the cursor position within the
collection, is a composite identifier or not.
|
void |
visit(CollectionExpression expression)
Visits the
CollectionExpression expression. |
void |
visit(FromClause expression)
Visits the
FromClause 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(OrderByClause expression)
Visits the
OrderByClause expression. |
void |
visit(RangeVariableDeclaration expression)
Visits the
RangeVariableDeclaration expression. |
void |
visit(WhereClause expression)
Visits the
WhereClause expression. |
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
protected java.lang.String clause
protected boolean complete
Expression
that was visited is complete or if some part is missing.protected boolean insideCollection
protected IncompleteCollectionExpressionVisitor()
protected java.util.List<java.lang.String> compositeIdentifiersAfter(java.lang.String afterIdentifier)
afterIdentifier
- The JPQL identifier of the clause for which the list of following
clauses is builtpublic void dispose()
public boolean isComplete()
Expression
that was visited is complete or if some part is missing.true
if the visited Expression
is grammatically complete;
false
if it is incompleteprotected boolean isPossibleCompositeIdentifier(java.lang.String clause, java.lang.String fragment)
clause
- The JPQL identifier of the clause having the collection of expressionsfragment
- The parsed text of the expression to determine if it's the beginning of the
composite identifier or not. The fragment is all lower case characterspublic void visit(CollectionExpression expression)
CollectionExpression
expression.visit
in interface ExpressionVisitor
visit
in class AbstractExpressionVisitor
expression
- The Expression
to visitpublic void visit(FromClause expression)
FromClause
expression.visit
in interface ExpressionVisitor
visit
in class AbstractExpressionVisitor
expression
- The Expression
to visitpublic void visit(GroupByClause expression)
GroupByClause
expression.visit
in interface ExpressionVisitor
visit
in class AbstractExpressionVisitor
expression
- The Expression
to visitpublic void visit(HavingClause expression)
HavingClause
expression.visit
in interface ExpressionVisitor
visit
in class AbstractExpressionVisitor
expression
- The Expression
to visitpublic void visit(IdentificationVariable expression)
IdentificationVariable
expression.visit
in interface ExpressionVisitor
visit
in class AbstractExpressionVisitor
expression
- The Expression
to visitpublic void visit(IdentificationVariableDeclaration expression)
IdentificationVariableDeclaration
expression.visit
in interface ExpressionVisitor
visit
in class AbstractExpressionVisitor
expression
- The Expression
to visitpublic void visit(OrderByClause expression)
OrderByClause
expression.visit
in interface ExpressionVisitor
visit
in class AbstractExpressionVisitor
expression
- The Expression
to visitpublic void visit(RangeVariableDeclaration expression)
RangeVariableDeclaration
expression.visit
in interface ExpressionVisitor
visit
in class AbstractExpressionVisitor
expression
- The Expression
to visitpublic void visit(WhereClause expression)
WhereClause
expression.visit
in interface ExpressionVisitor
visit
in class AbstractExpressionVisitor
expression
- The WhereClause
to visit