EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

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

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.AbstractContentAssistVisitor.OrderByClauseStatementHelper
All Implemented Interfaces:
AbstractContentAssistVisitor.StatementHelper<SelectStatement>
Direct Known Subclasses:
EclipseLinkContentAssistVisitor.OrderByClauseStatementHelper
Enclosing class:
AbstractContentAssistVisitor

protected class AbstractContentAssistVisitor.OrderByClauseStatementHelper
extends java.lang.Object
implements AbstractContentAssistVisitor.StatementHelper<SelectStatement>


Constructor Summary
protected AbstractContentAssistVisitor.OrderByClauseStatementHelper()
           
 
Method Summary
 void addClauseProposals()
          Adds the JPQL identifier of the clause being scanned by this helper.
 void addInternalClauseProposals(SelectStatement expression)
          Adds the JPQL identifier of the internal clause being scanned by this helper.
 Expression getClause(SelectStatement expression)
          Returns the clause being scanned by this helper.
 AbstractContentAssistVisitor.StatementHelper<SelectStatement> 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(SelectStatement expression)
          Determines whether the clause exists in the parsed tree.
 boolean hasSpaceAfterClause(SelectStatement expression)
          Determines whether there is a space (owned by the SELECT statement) after the clause being scanned by this helper.
 boolean isClauseComplete(SelectStatement 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractContentAssistVisitor.OrderByClauseStatementHelper

protected AbstractContentAssistVisitor.OrderByClauseStatementHelper()
Method Detail

addClauseProposals

public 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.

Specified by:
addClauseProposals in interface AbstractContentAssistVisitor.StatementHelper<SelectStatement>

addInternalClauseProposals

public void addInternalClauseProposals(SelectStatement 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.

Specified by:
addInternalClauseProposals in interface AbstractContentAssistVisitor.StatementHelper<SelectStatement>
Parameters:
expression - The AbstractSelectStatement being visited

getClause

public Expression getClause(SelectStatement 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.

Specified by:
getClause in interface AbstractContentAssistVisitor.StatementHelper<SelectStatement>
Parameters:
expression - The AbstractSelectStatement being visited
Returns:
The clause being scanned

getNextHelper

public AbstractContentAssistVisitor.StatementHelper<SelectStatement> 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.

Specified by:
getNextHelper in interface AbstractContentAssistVisitor.StatementHelper<SelectStatement>
Returns:
The AbstractContentAssistVisitor.AbstractFromClauseStatementHelper for the next clause

hasClause

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

Specified by:
hasClause in interface AbstractContentAssistVisitor.StatementHelper<SelectStatement>
Parameters:
expression - The AbstractSelectStatement being visited
Returns:
true if the clause has been parsed; false otherwise

hasSpaceAfterClause

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

Specified by:
hasSpaceAfterClause in interface AbstractContentAssistVisitor.StatementHelper<SelectStatement>
Parameters:
expression - The AbstractSelectStatement being visited
Returns:
true if a space follows the clause; false otherwise

isClauseComplete

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

Specified by:
isClauseComplete in interface AbstractContentAssistVisitor.StatementHelper<SelectStatement>
Parameters:
expression - The AbstractSelectStatement being visited
Returns:
true if the clause is complete; false otherwise

isRequired

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

Specified by:
isRequired in interface AbstractContentAssistVisitor.StatementHelper<SelectStatement>
Returns:
true if the clause has to be defined; false if the clause is optional

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference