Expression takes care of parsing an expression that encapsulates three expressions
separated by a comma.
expression ::= <identifier>(first_expression, second_expression, third_expression)LocateExpression, SubstringExpression
| Modifier and Type | Field and Description |
|---|---|
| private AbstractExpression | firstExpression
The |
| private boolean | hasFirstComma
Determines whether the comma separating the first and second expression was parsed. |
| private boolean | hasSecondComma
Determines whether the comma separating the first and second expression was parsed. |
| private boolean | hasSpaceAfterFirstComma
Determines whether a whitespace is following the comma. |
| private boolean | hasSpaceAfterSecondComma
Determines whether a whitespace is following the comma. |
| protected int | parameterIndex
Determines which child expression is been currently parsed. |
| private AbstractExpression | secondExpression
The |
| private AbstractExpression | thirdExpression
The |
| Access | Constructor and Description |
|---|---|
| protected | AbstractTripleEncapsulatedExpression(AbstractExpression
The parent of this expression parent, String The JPQL identifier that starts this expression identifier)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| 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 | addOrderedEncapsulatedExpressionTo(List<Expression>
The list used to store the string representation of the encapsulated children)ExpressionImplements abstract org. Expressions representing the encapsulated Expression.
|
| public final CollectionExpression | Returns: The first, second and third expressions represented by a temporary collectionCreates a new |
| 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 final Expression | Returns: The expression that was parsed representing the first expressionReturns the |
| public abstract String | Returns: The ID of theJPQLQueryBNF to be used to parse one of the encapsulated expressionThe position of the encapsulated index)Expression that needs to be parsed
within the parenthesis, which starts at position 0Returns the unique identifier of the |
| public final Expression | Returns: The expression that was parsed representing the second expressionReturns the |
| public final Expression | Returns: The expression that was parsed representing the first expressionReturns the |
| public boolean | hasEncapsulatedExpression()
Implements abstract org. |
| public final boolean | Returns: true if a comma was parsed after the first expression;
false otherwiseDetermines whether the comma was parsed after the first expression. |
| public final boolean | Returns: true if the first expression was parsed; false if it was not
parsedDetermines whether the first expression of the query was parsed. |
| public final boolean | Returns: true if a comma was parsed after the second expression; false
otherwiseDetermines whether the comma was parsed after the second expression. |
| public final boolean | Returns: true if the second expression was parsed; false if it was
not parsedDetermines whether the second expression of the query was parsed. |
| public final boolean | Returns: true if there was a whitespace after the first comma; false
otherwiseDetermines whether a whitespace was parsed after the first comma. |
| public final boolean | Returns: true if there was a whitespace after the second comma; false
otherwiseDetermines whether a whitespace was parsed after the second comma. |
| public final boolean | Returns: true if the third expression was parsed; false if it was not
parsedDetermines whether the third expression of the query was parsed. |
| protected boolean | isParsingComplete(WordParser
The text to parse based on the current position of the cursor wordParser, String The word that was retrieved from the given text, which is the first word in the text word, Expression The expression)Expression that has already been parsedOverrides org. |
| protected abstract boolean | Returns: true if the third expression can either be present or not in a valid
query; false if it's mandatoryDetermines whether the third expression is an optional expression, which means a valid query can have it or not. |
| protected void | parseEncapsulatedExpression(WordParser
The text to parse based on the current position of the cursor wordParser, int The number of whitespace characters that were parsed after '(' whitespaceCount, 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.
|
| protected void | removeEncapsulatedExpression()
Implements abstract org. Expression that was parsed, it should not be part of this one.
|
| protected final void | toParsedTextEncapsulatedExpression(StringBuilder
The buffer used to append the encapsulated writer, boolean Expression's string
representationDetermines whether to include any characters that are considered
virtual, i.e. that was parsed when the query is incomplete and is needed for functionality
like content assist actual)Implements abstract org. Expression.
|
| firstExpression | back to summary |
|---|---|
| private AbstractExpression firstExpression The | |
| hasFirstComma | back to summary |
|---|---|
| private boolean hasFirstComma Determines whether the comma separating the first and second expression was parsed. | |
| hasSecondComma | back to summary |
|---|---|
| private boolean hasSecondComma Determines whether the comma separating the first and second expression was parsed. | |
| hasSpaceAfterFirstComma | back to summary |
|---|---|
| private boolean hasSpaceAfterFirstComma Determines whether a whitespace is following the comma. | |
| hasSpaceAfterSecondComma | back to summary |
|---|---|
| private boolean hasSpaceAfterSecondComma Determines whether a whitespace is following the comma. | |
| parameterIndex | back to summary |
|---|---|
| protected int parameterIndex Determines which child expression is been currently parsed. | |
| secondExpression | back to summary |
|---|---|
| private AbstractExpression secondExpression The | |
| thirdExpression | back to summary |
|---|---|
| private AbstractExpression thirdExpression The | |
| AbstractTripleEncapsulatedExpression | back to summary |
|---|---|
| protected AbstractTripleEncapsulatedExpression(AbstractExpression parent, String identifier) Creates a new
| |
| 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
| |
| addOrderedEncapsulatedExpressionTo | back to summary |
|---|---|
| protected void addOrderedEncapsulatedExpressionTo(List<Expression> children) Implements abstract org. Adds the
| |
| buildCollectionExpression | back to summary |
|---|---|
| public final CollectionExpression buildCollectionExpression() Creates a new
| |
| findQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF findQueryBNF(Expression expression) Overrides org. Implements org. Doc from org. Retrieves the
| |
| getFirstExpression | back to summary |
|---|---|
| public final Expression getFirstExpression() Returns the
| |
| getParameterQueryBNFId | back to summary |
|---|---|
| public abstract String getParameterQueryBNFId(int index) Returns the unique identifier of the
| |
| getSecondExpression | back to summary |
|---|---|
| public final Expression getSecondExpression() Returns the
| |
| getThirdExpression | back to summary |
|---|---|
| public final Expression getThirdExpression() Returns the
| |
| hasEncapsulatedExpression | back to summary |
|---|---|
| public boolean hasEncapsulatedExpression() Implements abstract org. Doc from org. Determines whether something was parsed after the left parenthesis.
| |
| hasFirstComma | back to summary |
|---|---|
| public final boolean hasFirstComma() Determines whether the comma was parsed after the first expression.
| |
| hasFirstExpression | back to summary |
|---|---|
| public final boolean hasFirstExpression() Determines whether the first expression of the query was parsed.
| |
| hasSecondComma | back to summary |
|---|---|
| public final boolean hasSecondComma() Determines whether the comma was parsed after the second expression.
| |
| hasSecondExpression | back to summary |
|---|---|
| public final boolean hasSecondExpression() Determines whether the second expression of the query was parsed.
| |
| hasSpaceAfterFirstComma | back to summary |
|---|---|
| public final boolean hasSpaceAfterFirstComma() Determines whether a whitespace was parsed after the first comma.
| |
| hasSpaceAfterSecondComma | back to summary |
|---|---|
| public final boolean hasSpaceAfterSecondComma() Determines whether a whitespace was parsed after the second comma.
| |
| hasThirdExpression | back to summary |
|---|---|
| public final boolean hasThirdExpression() Determines whether the third expression of the query was parsed.
| |
| isParsingComplete | back to summary |
|---|---|
| protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression) Overrides org. Doc from org. Determines whether the parsing is complete based on what is left in the given text. The text is never empty.
| |
| isThirdExpressionOptional | back to summary |
|---|---|
| protected abstract boolean isThirdExpressionOptional() Determines whether the third expression is an optional expression, which means a valid query can have it or not.
| |
| parseEncapsulatedExpression | back to summary |
|---|---|
| protected void parseEncapsulatedExpression(WordParser wordParser, int whitespaceCount, boolean tolerant) Implements abstract org. Doc from org. Parses the encapsulated expression by starting at the current position, which is part of the
given
| |
| removeEncapsulatedExpression | back to summary |
|---|---|
| protected void removeEncapsulatedExpression() Implements abstract org. Doc from org. Removes the encapsulated
| |
| toParsedTextEncapsulatedExpression | back to summary |
|---|---|
| protected final void toParsedTextEncapsulatedExpression(StringBuilder writer, boolean actual) Implements abstract org. Generates a string representation of the encapsulated
| |