EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

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

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.parser.AbstractExpressionVisitor
      extended by org.eclipse.persistence.jpa.jpql.AbstractContentAssistVisitor.CompletenessVisitor
          extended by org.eclipse.persistence.jpa.jpql.AbstractContentAssistVisitor.IncompleteCollectionExpressionVisitor
All Implemented Interfaces:
ExpressionVisitor
Enclosing class:
AbstractContentAssistVisitor

protected class AbstractContentAssistVisitor.IncompleteCollectionExpressionVisitor
extends AbstractContentAssistVisitor.CompletenessVisitor

This visitor is used when a clause or a compound expression was parsed with a collection of expressions representing an invalid fragment.

Example: SELECT e FROM Employee e GROUP B

In this example, the FROM clause contains a collection of two identification variable declarations, in a valid query, it would be separated by a comma, but this one just means it's incomplete and "GROUP B" is the beginning of the GROUP BY clause.


Field Summary
protected  java.lang.String clause
          The clause being visited, which is marked by its JPQL identifier.
protected  boolean insideCollection
          This flag is used to make sure only the last expression in a collection is tested.
 
Fields inherited from class org.eclipse.persistence.jpa.jpql.AbstractContentAssistVisitor.CompletenessVisitor
complete
 
Constructor Summary
protected AbstractContentAssistVisitor.IncompleteCollectionExpressionVisitor()
           
 
Method Summary
protected  java.util.List<java.lang.String> compositeIdentifiersAfter(java.lang.String afterIdentifier)
          Returns the list of identifiers for the clauses following the given identifier.
protected  boolean isPossibleCompositeIdentifier(java.lang.String clause, java.lang.String fragment)
          Determines whether the given JPQL fragment, which is the parsed text of the expression invalid collection expression or the portion of it based on the cursor position within the collection, is a composite identifier or not.
 void visit(CollectionExpression expression)
          Visits the CollectionExpression expression.
 void visit(FromClause expression)
          Visits the FromClause expression.
 void visit(GroupByClause expression)
          Visits the GroupByClause expression.
 void visit(HavingClause expression)
          Visits the HavingClause expression.
 void visit(IdentificationVariable expression)
          Visits the IdentificationVariable expression.
 void visit(IdentificationVariableDeclaration expression)
          Visits the IdentificationVariableDeclaration expression.
 void visit(OrderByClause expression)
          Visits the OrderByClause expression.
 void visit(RangeVariableDeclaration expression)
          Visits the RangeVariableDeclaration expression.
 void visit(WhereClause expression)
          Visits the WhereClause expression.
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.AbstractContentAssistVisitor.CompletenessVisitor
dispose, isComplete
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AbstractExpressionVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clause

protected java.lang.String clause
The clause being visited, which is marked by its JPQL identifier.


insideCollection

protected boolean insideCollection
This flag is used to make sure only the last expression in a collection is tested. A single expression cannot be used to check the "completeness".

Constructor Detail

AbstractContentAssistVisitor.IncompleteCollectionExpressionVisitor

protected AbstractContentAssistVisitor.IncompleteCollectionExpressionVisitor()
Method Detail

compositeIdentifiersAfter

protected java.util.List<java.lang.String> compositeIdentifiersAfter(java.lang.String afterIdentifier)
Returns the list of identifiers for the clauses following the given identifier.

Parameters:
afterIdentifier - The JPQL identifier of the clause for which the list of following clauses is built
Returns:
The list of JPQL identifiers defining the clauses following the clause specified by the given identifier

isPossibleCompositeIdentifier

protected boolean isPossibleCompositeIdentifier(java.lang.String clause,
                                                java.lang.String fragment)
Determines whether the given JPQL fragment, which is the parsed text of the expression invalid collection expression or the portion of it based on the cursor position within the collection, is a composite identifier or not.

Parameters:
clause - The JPQL identifier of the clause having the collection of expressions
fragment - The parsed text of the expression to determine if it's the beginning of the composite identifier or not. The fragment is all lower case characters

visit

public void visit(CollectionExpression expression)
Visits the CollectionExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AbstractContentAssistVisitor.CompletenessVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(FromClause expression)
Visits the FromClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AbstractExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(GroupByClause expression)
Visits the GroupByClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AbstractExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(HavingClause expression)
Visits the HavingClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AbstractExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(IdentificationVariable expression)
Visits the IdentificationVariable expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AbstractExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(IdentificationVariableDeclaration expression)
Visits the IdentificationVariableDeclaration expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AbstractExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(OrderByClause expression)
Visits the OrderByClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AbstractExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(RangeVariableDeclaration expression)
Visits the RangeVariableDeclaration expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AbstractExpressionVisitor
Parameters:
expression - The Expression to visit

visit

public void visit(WhereClause expression)
Visits the WhereClause expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AbstractExpressionVisitor
Parameters:
expression - The WhereClause to visit

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference