EclipseLink 2.5.0, build 'v20130312-9664d23' API Reference

org.eclipse.persistence.jpa.jpql.tools
Interface AbstractContentAssistVisitor.CollectionExpressionHelper<T extends Expression>

All Known Implementing Classes:
AbstractContentAssistVisitor.AbstractConditionalClauseCollectionHelper, AbstractContentAssistVisitor.AbstractSelectClauseCollectionHelper, AbstractContentAssistVisitor.ConcatExpressionCollectionHelper, AbstractContentAssistVisitor.ConstrutorCollectionHelper, AbstractContentAssistVisitor.DeleteClauseCollectionHelper, AbstractContentAssistVisitor.DoubleEncapsulatedCollectionHelper, AbstractContentAssistVisitor.FromClauseCollectionHelper, AbstractContentAssistVisitor.GroupByClauseCollectionHelper, AbstractContentAssistVisitor.JoinCollectionHelper, AbstractContentAssistVisitor.OrderByClauseCollectionHelper, AbstractContentAssistVisitor.SelectClauseCollectionHelper, AbstractContentAssistVisitor.SimpleSelectClauseCollectionHelper, AbstractContentAssistVisitor.TripleEncapsulatedCollectionHelper, AbstractContentAssistVisitor.UpdateItemCollectionHelper, EclipseLinkContentAssistVisitor.FromClauseCollectionHelper
Enclosing class:
AbstractContentAssistVisitor

protected static interface AbstractContentAssistVisitor.CollectionExpressionHelper<T extends Expression>

This helper is used to determine how to add proposals within a collection of expressions. Each expression is usually separated by either a whitespace or by a comma.


Method Summary
 void addAtTheEndOfChild(T expression, CollectionExpression collectionExpression, int index, boolean hasComma, boolean virtualSpace)
          Adds the proposals because the cursor is at the end of the child at the given position.
 void addIdentifier(T expression, java.lang.String identifier)
          Adds the given JPQL identifier as a valid proposal.
 void addTheBeginningOfChild(T expression, CollectionExpression collectionExpression, int index, boolean hasComma)
          Adds the proposals because the cursor is at the beginning of the child Expression at the given position.
 CollectionExpression buildCollectionExpression(T expression)
          Either returns the given Expression's child, which is already a CollectionExpression or requests this helper to return a "virtual" CollectionExpression that is wrapping the single element.
 boolean canContinue(T expression, CollectionExpression collectionExpression, int index)
           
 boolean hasDelimiterAfterIdentifier(T expression)
          Determines whether
 int maxCollectionSize(T expression)
          Returns the maximum number of encapsulated expressions the Expression allows.
 int preExpressionLength(T expression)
          Returns the length to add to
 JPQLQueryBNF queryBNF(T expression, int index)
          Returns the
 

Method Detail

addAtTheEndOfChild

void addAtTheEndOfChild(T expression,
                        CollectionExpression collectionExpression,
                        int index,
                        boolean hasComma,
                        boolean virtualSpace)
Adds the proposals because the cursor is at the end of the child at the given position.

Parameters:
expression - The Expression being visited
collectionExpression - The CollectionExpression is either the child of the given Expression or a temporary generated one that usually contains a single item
index - The position of that child in the collection of children
hasComma - Indicates whether a comma is present before the child at the given position; if the index is 0, then this is false by default
virtualSpace - Indicates if this method is called because the cursor is at the end of the child at the specified index but by considering there is a virtual space at the end of that child

addIdentifier

void addIdentifier(T expression,
                   java.lang.String identifier)
Adds the given JPQL identifier as a valid proposal.

Parameters:
expression - The Expression being visited
identifier - The JPQL identifier to add as a valid proposal

addTheBeginningOfChild

void addTheBeginningOfChild(T expression,
                            CollectionExpression collectionExpression,
                            int index,
                            boolean hasComma)
Adds the proposals because the cursor is at the beginning of the child Expression at the given position.

Parameters:
expression - The Expression being visited
collectionExpression - The CollectionExpression is either the child of the given Expression or a temporary generated one that usually contains a single item. This can be null if the position is at the beginning
index - The position of the child that was scanned
hasComma - Indicates whether a comma is present before the child at the given position; if the index is 0, then this is false by default

buildCollectionExpression

CollectionExpression buildCollectionExpression(T expression)
Either returns the given Expression's child, which is already a CollectionExpression or requests this helper to return a "virtual" CollectionExpression that is wrapping the single element.

Parameters:
expression - The parent of the children to retrieve
Returns:
The given expression's child or a "virtual" one

canContinue

boolean canContinue(T expression,
                    CollectionExpression collectionExpression,
                    int index)

hasDelimiterAfterIdentifier

boolean hasDelimiterAfterIdentifier(T expression)
Determines whether

Parameters:
expression -
Returns:

maxCollectionSize

int maxCollectionSize(T expression)
Returns the maximum number of encapsulated expressions the Expression allows. Some expression only allow 2, others 3 and others allow an unlimited number.

Parameters:
expression - The Expression for which its maximum number of children
Returns:
The maximum number of children the expression can have

preExpressionLength

int preExpressionLength(T expression)
Returns the length to add to


queryBNF

JPQLQueryBNF queryBNF(T expression,
                      int index)
Returns the

Parameters:
expression -
Returns:

EclipseLink 2.5.0, build 'v20130312-9664d23' API Reference