EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
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.OrderByClauseStatementHelper, 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
 void addClauseProposals()
          Adds the JPQL identifier of the clause being scanned by this helper.
 void addInternalClauseProposals(T expression)
          Adds the JPQL identifier of the internal clause being scanned by this helper.
 Expression getClause(T expression)
          Returns the clause being scanned by this helper.
 AbstractContentAssistVisitor.StatementHelper<? extends T> getNextHelper()
          Returns the AbstractContentAssistVisitor.AbstractFromClauseStatementHelper that will scan the following clause, which is based on the grammar and not on the actual existence of the clause in the parsed tree.
 boolean hasClause(T expression)
          Determines whether the clause exists in the parsed tree.
 boolean hasSpaceAfterClause(T expression)
          Determines whether there is a space (owned by the SELECT statement) after the clause being scanned by this helper.
 boolean isClauseComplete(T expression)
          Determines whether the clause being scanned is complete or not.
 boolean isRequired()
          Determines whether the clause is required in order to make the JPQL query grammatically valid.
 

Method Detail

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

void addInternalClauseProposals(T expression)
Adds the JPQL identifier of the internal clause being scanned by this helper. For instance, the FROM clause 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 - The AbstractSelectStatement being visited

getClause

Expression getClause(T expression)
Returns the clause being scanned by this helper. It is safe to type cast the clause because #hasClause(AbstractSelectStatement) is called before this one.

Parameters:
expression - The AbstractSelectStatement being visited
Returns:
The clause being scanned

getNextHelper

AbstractContentAssistVisitor.StatementHelper<? extends T> getNextHelper()
Returns the AbstractContentAssistVisitor.AbstractFromClauseStatementHelper that 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.AbstractFromClauseStatementHelper for the next clause

hasClause

boolean hasClause(T expression)
Determines whether the clause exists in the parsed tree.

Parameters:
expression - The AbstractSelectStatement being visited
Returns:
true if the clause has been parsed; false otherwise

hasSpaceAfterClause

boolean hasSpaceAfterClause(T expression)
Determines whether there is a space (owned by the SELECT statement) after the clause being scanned by this helper.

Parameters:
expression - The AbstractSelectStatement being visited
Returns:
true if a space follows the clause; false otherwise

isClauseComplete

boolean isClauseComplete(T expression)
Determines whether the clause being scanned is complete or not.

Parameters:
expression - The AbstractSelectStatement being visited
Returns:
true if the clause is complete; false otherwise

isRequired

boolean isRequired()
Determines whether the clause is required in order to make the JPQL query grammatically valid.

Returns:
true if the clause has to be defined; false if the clause is optional

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference