Interface AbstractContentAssistVisitor.StatementHelper<T extends Expression>
- All Known Implementing Classes:
AbstractContentAssistVisitor.AbstractFromClauseStatementHelper,AbstractContentAssistVisitor.AbstractGroupByClauseStatementHelper,AbstractContentAssistVisitor.AbstractHavingClauseStatementHelper,AbstractContentAssistVisitor.AbstractSelectClauseStatementHelper,AbstractContentAssistVisitor.AbstractWhereClauseSelectStatementHelper,AbstractContentAssistVisitor.DeleteClauseStatementHelper,AbstractContentAssistVisitor.FromClauseStatementHelper,AbstractContentAssistVisitor.GroupByClauseStatementHelper,AbstractContentAssistVisitor.HavingClauseStatementHelper,AbstractContentAssistVisitor.OrderByClauseStatementHelper,AbstractContentAssistVisitor.SelectClauseStatementHelper,AbstractContentAssistVisitor.SimpleFromClauseStatementHelper,AbstractContentAssistVisitor.SimpleGroupByClauseStatementHelper,AbstractContentAssistVisitor.SimpleHavingClauseStatementHelper,AbstractContentAssistVisitor.SimpleSelectClauseStatementHelper,AbstractContentAssistVisitor.SimpleWhereClauseSelectStatementHelper,AbstractContentAssistVisitor.UpdateClauseStatementHelper,AbstractContentAssistVisitor.WhereClauseDeleteStatementHelper,AbstractContentAssistVisitor.WhereClauseSelectStatementHelper,AbstractContentAssistVisitor.WhereClauseUpdateStatementHelper,EclipseLinkContentAssistVisitor.FromClauseStatementHelper,EclipseLinkContentAssistVisitor.OrderByClauseStatementHelper,EclipseLinkContentAssistVisitor.SimpleFromClauseStatementHelper,EclipseLinkContentAssistVisitor.UnionClauseStatementHelper
- Enclosing class:
AbstractContentAssistVisitor
protected static interface AbstractContentAssistVisitor.StatementHelper<T extends Expression>
This helper helps to add JPQL identifiers for the clauses that make up a query statement and
also chains the clauses within the query.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the JPQL identifier of the clause being scanned by this helper.voidaddInternalClauseProposals(T expression) Adds the JPQL identifier of the internal clause being scanned by this helper.Returns the clause being scanned by this helper.AbstractContentAssistVisitor.StatementHelper<? extends T> Returns theAbstractContentAssistVisitor.StatementHelperthat will scan the following clause, which is based on the grammar and not on the actual existence of the clause in the parsed tree.booleanDetermines whether the clause exists in the parsed tree.booleanhasSpaceAfterClause(T expression) Determines whether there is a space (owned by the SELECT statement) after the clause being scanned by this helper.booleanisClauseComplete(T expression) Determines whether the clause being scanned is complete or not.booleanDetermines whether the clause is required in order to make the JPQL query grammatically valid.
-
Method Details
-
addClauseProposals
void addClauseProposals()Adds the JPQL identifier of the clause being scanned by this helper.Note: The identifier should not be added directly to the list, it needs to be filtered out based on the location of the cursor, it can be within a word.
-
addInternalClauseProposals
Adds the JPQL identifier of the internal clause being scanned by this helper. For instance, theFROMclause could add its own sub-clauses.Note: The identifier should not be added directly to the list, it needs to be filtered out based on the location of the cursor, it can be within a word.
- Parameters:
expression- TheAbstractSelectStatementbeing visited
-
getClause
Returns the clause being scanned by this helper. It is safe to type cast the clause becausehasClause(Expression)is called before this one.- Parameters:
expression- TheAbstractSelectStatementbeing visited- Returns:
- The clause being scanned
-
getNextHelper
AbstractContentAssistVisitor.StatementHelper<? extends T> getNextHelper()Returns theAbstractContentAssistVisitor.StatementHelperthat will scan the following clause, which is based on the grammar and not on the actual existence of the clause in the parsed tree.- Returns:
- The
AbstractContentAssistVisitor.StatementHelperfor the next clause
-
hasClause
Determines whether the clause exists in the parsed tree.- Parameters:
expression- TheAbstractSelectStatementbeing visited- Returns:
trueif the clause has been parsed;falseotherwise
-
hasSpaceAfterClause
Determines whether there is a space (owned by the SELECT statement) after the clause being scanned by this helper.- Parameters:
expression- TheAbstractSelectStatementbeing visited- Returns:
trueif a space follows the clause;falseotherwise
-
isClauseComplete
Determines whether the clause being scanned is complete or not.- Parameters:
expression- TheAbstractSelectStatementbeing visited- Returns:
trueif the clause is complete;falseotherwise
-
isRequired
boolean isRequired()Determines whether the clause is required in order to make the JPQL query grammatically valid.- Returns:
trueif the clause has to be defined;falseif the clause is optional
-