CollectionExpression wraps many expression which they are separated by spaces
and/or commas.
expression ::= child_item {, child_item }*expression ::= child_item { child_item }*| Modifier and Type | Field and Description |
|---|---|
| private List | children
Hides org. Expressions that forms a collection within another expression.
|
| private List | commas
The list of flags used to determine where to separate two child |
| private List | spaces
Flag used to determine when a space is required after a comma. |
| Access | Constructor and Description |
|---|---|
| public | CollectionExpression(AbstractExpression
The parent of this expression parent, List<AbstractExpression> The list of children that are regrouped together children, List<Boolean> The list of flags used to determine when to add a comma after an commas, List<Boolean> ExpressionThe list of flags used to determine when to add a space after an spaces)ExpressionCreates a new |
| public | CollectionExpression(AbstractExpression
The parent of this expression parent, List<AbstractExpression> The list of children that are regrouped together children, List<Boolean> The list of flags used to determine when to add a comma after an commas, List<Boolean> ExpressionThe list of flags used to determine when to add a space after an spaces, boolean ExpressionFlag used to determine if this expression is temporarily used, which means
the children will not be parented to this object temporary)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(ExpressionVisitor
The visitor)ExpressionVisitor to visit this objectImplements org. Expression by the given visitor.
|
| public void | accept(int
The index of the child to visit index, ExpressionVisitor The visitor)ExpressionVisitor to visit a specific childVisits the child |
| public void | acceptChildren(ExpressionVisitor
The visitor)visitor to visit the children of this object.Implements org. Expression.
|
| protected void | addChildrenTo(Collection<Expression>
The collection used to store the children children)Overrides org. AbstractExpression to the given collection.
|
| protected void | addOrderedChildrenTo(List<Expression>
The list used to store the string representation of this children)AbstractExpressionOverrides org. AbstractExpression to the given list.
|
| public int | Returns: The total count ofexpressions aggregated with spaces and/or commasReturns the count of child |
| public boolean | Returns: true if the string representation of this CollectionExpression
ends with a comma (the ending space is not checked)Determines whether this |
| public boolean | Returns: true if the string representation of this CollectionExpression
ends with a space (the ending comma is not checked)Determines whether this |
| public JPQLQueryBNF | findQueryBNF(Expression
The expression)Expression that is a descendant of this oneOverrides org. Implements org. JPQLQueryBNF that represents the fragment of this Expression
that was used when parsing the given Expression.
|
| public Expression | Returns: The childExpression at the given positionThe position of the child index)Expression to retrieveRetrieves the child |
| private AbstractExpression | |
| public JPQLQueryBNF | getQueryBNF()
Implements org. Expression.
|
| public boolean | hasComma(int
The index of the child index)Expression to verify if there is a comma following itDetermines whether a comma was parsed at the given position. |
| public boolean | hasSpace(int
The index of the child index)Expression to verify if there is a space following
it, which could be after a comma, if one was parsedDetermines whether a space was parsed at the given position. |
| public int | Returns: The index in the collection of the givenExpression or -1 if it is not a childThe expression)Expression that might be a child of this expressionRetrieves the index of the given |
| protected void | parse(WordParser
The text to parse based on the current position of the cursor wordParser, boolean Determines whether the parsing system should be tolerant, meaning if it should
try to parse invalid or incomplete queries tolerant)Implements abstract org. WordParser.
|
| public String | Returns: The string representation of thisExpressionThe index used to determine when to create the string representation, which
is exclusive endIndex)Returns a string representation of this |
| public String | Returns: The string representation of thisExpressionThe index used to determine when to create the string representation, which
is exclusive endIndex)Generates a string representation of this |
| protected void | toParsedText(StringBuilder
The buffer used to append this writer, boolean Expression's string representationDetermines whether the string representation should represent what was parsed,
i.e. include any "virtual" whitespace (such as ending whitespace) and the actual case of the
JPQL identifiers actual)Implements abstract org. Expression, including its children,
if it has any.
|
| private void | |
| private void |
| children | back to summary |
|---|---|
| private List<AbstractExpression> children Hides org. The | |
| commas | back to summary |
|---|---|
| private List<Boolean> commas The list of flags used to determine where to separate two child | |
| spaces | back to summary |
|---|---|
| private List<Boolean> spaces Flag used to determine when a space is required after a comma. | |
| CollectionExpression | back to summary |
|---|---|
| public CollectionExpression(AbstractExpression parent, List<AbstractExpression> children, List<Boolean> commas, List<Boolean> spaces) Creates a new
| |
| CollectionExpression | back to summary |
|---|---|
| public CollectionExpression(AbstractExpression parent, List<AbstractExpression> children, List<Boolean> commas, List<Boolean> spaces, boolean temporary) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(ExpressionVisitor visitor) Implements org. Doc from org. Visits this
| |
| accept | back to summary |
|---|---|
| public void accept(int index, ExpressionVisitor visitor) Visits the child
| |
| acceptChildren | back to summary |
|---|---|
| public void acceptChildren(ExpressionVisitor visitor) Implements org. Doc from org. Visits the children of this
This does not traverse the
| |
| addChildrenTo | back to summary |
|---|---|
| protected void addChildrenTo(Collection<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| addOrderedChildrenTo | back to summary |
|---|---|
| protected void addOrderedChildrenTo(List<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| childrenSize | back to summary |
|---|---|
| public int childrenSize() Returns the count of child
| |
| endsWithComma | back to summary |
|---|---|
| public boolean endsWithComma() Determines whether this
| |
| endsWithSpace | back to summary |
|---|---|
| public boolean endsWithSpace() Determines whether this
| |
| findQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF findQueryBNF(Expression expression) Overrides org. Implements org. Doc from org. Retrieves the
| |
| getChild | back to summary |
|---|---|
| public Expression getChild(int index) Retrieves the child
| |
| getChildInternal | back to summary |
|---|---|
| private AbstractExpression getChildInternal(int index) | |
| getQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF getQueryBNF() Implements org. Doc from org. Returns the BNF of this
| |
| hasComma | back to summary |
|---|---|
| public boolean hasComma(int index) Determines whether a comma was parsed at the given position. The index is the position of the comma that is following the child at the same position.
| |
| hasSpace | back to summary |
|---|---|
| public boolean hasSpace(int index) Determines whether a space was parsed at the given position. The index is the position of the space that is following the child at the same position, which is after a comma, if one was also parsed at that location.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(Expression expression) Retrieves the index of the given
| |
| parse | back to summary |
|---|---|
| protected void parse(WordParser wordParser, boolean tolerant) Implements abstract org. Doc from org. Parses the query by starting at the current position, which is part of the given
| |
| toActualText | back to summary |
|---|---|
| public String toActualText(int endIndex) Returns a string representation of this
| |
| toParsedText | back to summary |
|---|---|
| public String toParsedText(int endIndex) Generates a string representation of this
| |
| toParsedText | back to summary |
|---|---|
| protected void toParsedText(StringBuilder writer, boolean actual) Implements abstract org. Doc from org. Generates a string representation of this
| |
| toParsedText | back to summary |
|---|---|
| private void toParsedText(StringBuilder writer, int endIndex, boolean actual) | |
| updateBackpointers | back to summary |
|---|---|
| private void updateBackpointers() | |