Class AbstractContentAssistVisitor.AbstractSelectClauseStatementHelper
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.AbstractContentAssistVisitor.AbstractSelectClauseStatementHelper
-
- All Implemented Interfaces:
AbstractContentAssistVisitor.StatementHelper<AbstractSelectStatement>
- Direct Known Subclasses:
AbstractContentAssistVisitor.SelectClauseStatementHelper
,AbstractContentAssistVisitor.SimpleSelectClauseStatementHelper
- Enclosing class:
- AbstractContentAssistVisitor
protected abstract static class AbstractContentAssistVisitor.AbstractSelectClauseStatementHelper extends java.lang.Object implements AbstractContentAssistVisitor.StatementHelper<AbstractSelectStatement>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSelectClauseStatementHelper(AbstractContentAssistVisitor visitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClauseProposals()
Adds the JPQL identifier of the clause being scanned by this helper.void
addInternalClauseProposals(AbstractSelectStatement expression)
Adds the JPQL identifier of the internal clause being scanned by this helper.Expression
getClause(AbstractSelectStatement expression)
Returns the clause being scanned by this helper.boolean
hasClause(AbstractSelectStatement expression)
Determines whether the clause exists in the parsed tree.boolean
hasSpaceAfterClause(AbstractSelectStatement expression)
Determines whether there is a space (owned by the SELECT statement) after the clause being scanned by this helper.boolean
isClauseComplete(AbstractSelectStatement 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
-
Methods inherited from interface org.eclipse.persistence.jpa.jpql.tools.AbstractContentAssistVisitor.StatementHelper
getNextHelper
-
-
-
-
Constructor Detail
-
AbstractSelectClauseStatementHelper
protected AbstractSelectClauseStatementHelper(AbstractContentAssistVisitor visitor)
-
-
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 interfaceAbstractContentAssistVisitor.StatementHelper<AbstractSelectStatement>
-
addInternalClauseProposals
public void addInternalClauseProposals(AbstractSelectStatement expression)
Adds the JPQL identifier of the internal clause being scanned by this helper. For instance, theFROM
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 interfaceAbstractContentAssistVisitor.StatementHelper<AbstractSelectStatement>
- Parameters:
expression
- TheAbstractSelectStatement
being visited
-
getClause
public Expression getClause(AbstractSelectStatement expression)
Returns the clause being scanned by this helper. It is safe to type cast the clause becauseAbstractContentAssistVisitor.StatementHelper.hasClause(Expression)
is called before this one.- Specified by:
getClause
in interfaceAbstractContentAssistVisitor.StatementHelper<AbstractSelectStatement>
- Parameters:
expression
- TheAbstractSelectStatement
being visited- Returns:
- The clause being scanned
-
hasClause
public boolean hasClause(AbstractSelectStatement expression)
Determines whether the clause exists in the parsed tree.- Specified by:
hasClause
in interfaceAbstractContentAssistVisitor.StatementHelper<AbstractSelectStatement>
- Parameters:
expression
- TheAbstractSelectStatement
being visited- Returns:
true
if the clause has been parsed;false
otherwise
-
hasSpaceAfterClause
public boolean hasSpaceAfterClause(AbstractSelectStatement expression)
Determines whether there is a space (owned by the SELECT statement) after the clause being scanned by this helper.- Specified by:
hasSpaceAfterClause
in interfaceAbstractContentAssistVisitor.StatementHelper<AbstractSelectStatement>
- Parameters:
expression
- TheAbstractSelectStatement
being visited- Returns:
true
if a space follows the clause;false
otherwise
-
isClauseComplete
public boolean isClauseComplete(AbstractSelectStatement expression)
Determines whether the clause being scanned is complete or not.- Specified by:
isClauseComplete
in interfaceAbstractContentAssistVisitor.StatementHelper<AbstractSelectStatement>
- Parameters:
expression
- TheAbstractSelectStatement
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 interfaceAbstractContentAssistVisitor.StatementHelper<AbstractSelectStatement>
- Returns:
true
if the clause has to be defined;false
if the clause is optional
-
-