expression ::= <identifier>(expression)| Modifier and Type | Field and Description |
|---|---|
| private boolean | hasLeftParenthesis
Flag used to determine if the closing parenthesis is present in the query. |
| private boolean | hasRightParenthesis
Flag used to determine if the opening parenthesis is present in the query. |
| private boolean | hasSpaceAfterIdentifier
Special flag used to separate the identifier with the encapsulated expression when the left parenthesis is missing. |
| private String | identifier
The actual identifier found in the string representation of the JPQL query. |
| Access | Constructor and Description |
|---|---|
| protected | AbstractEncapsulatedExpression(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 |
|---|---|
| protected final void | addOrderedChildrenTo(List<Expression>
The list used to store the string representation of this children)AbstractExpressionOverrides org. AbstractExpression to the given list.
|
| protected abstract void | addOrderedEncapsulatedExpressionTo(List<Expression>
The list used to store the string representation of the encapsulated children)ExpressionAdds the |
| protected boolean | |
| public final String | Returns: The JPQL identifier that was actually parsedReturns the actual identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public final String | |
| public abstract boolean | Returns: true if something was parsed; false otherwiseDetermines whether something was parsed after the left parenthesis. |
| public final boolean | Returns: true if the open parenthesis was present in the string version of the
query; false otherwiseDetermines whether the open parenthesis was parsed or not. |
| public final boolean | Returns: true if the close parenthesis was present in the string version of the
query; false otherwiseDetermines whether the close parenthesis was parsed or not. |
| public boolean | Returns: true if a whitespace was parsed after the identifier; false
otherwiseDetermines whether a whitespace was parsed after the identifier rather than the left parenthesis. |
| 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 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.
|
| protected abstract 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)Parses the encapsulated expression by starting at the current position, which is part of the
given |
| protected abstract void | removeEncapsulatedExpression()
Removes the encapsulated |
| protected boolean | Returns: true if the right parenthesis should be owned by this expression if it
is the next character to scan; false otherwiseThe 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)Determines whether the right parenthesis should be parsed or not by this expression. |
| protected final 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.
|
| protected abstract 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)Generates a string representation of the encapsulated |
| hasLeftParenthesis | back to summary |
|---|---|
| private boolean hasLeftParenthesis Flag used to determine if the closing parenthesis is present in the query. | |
| hasRightParenthesis | back to summary |
|---|---|
| private boolean hasRightParenthesis Flag used to determine if the opening parenthesis is present in the query. | |
| hasSpaceAfterIdentifier | back to summary |
|---|---|
| private boolean hasSpaceAfterIdentifier Special flag used to separate the identifier with the encapsulated expression when the left parenthesis is missing. | |
| identifier | back to summary |
|---|---|
| private String identifier The actual identifier found in the string representation of the JPQL query. | |
| AbstractEncapsulatedExpression | back to summary |
|---|---|
| protected AbstractEncapsulatedExpression(AbstractExpression parent, String identifier) Creates a new
| |
| addOrderedChildrenTo | back to summary |
|---|---|
| protected final void addOrderedChildrenTo(List<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| addOrderedEncapsulatedExpressionTo | back to summary |
|---|---|
| protected abstract void addOrderedEncapsulatedExpressionTo(List<Expression> children) Adds the
| |
| areLogicalIdentifiersSupported | back to summary |
|---|---|
| protected boolean areLogicalIdentifiersSupported() | |
| getActualIdentifier | back to summary |
|---|---|
| public final String getActualIdentifier() Returns the actual identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getIdentifier | back to summary |
|---|---|
| public final String getIdentifier() Returns the JPQL identifier of this expression.
| |
| hasEncapsulatedExpression | back to summary |
|---|---|
| public abstract boolean hasEncapsulatedExpression() Determines whether something was parsed after the left parenthesis.
| |
| hasLeftParenthesis | back to summary |
|---|---|
| public final boolean hasLeftParenthesis() Determines whether the open parenthesis was parsed or not.
| |
| hasRightParenthesis | back to summary |
|---|---|
| public final boolean hasRightParenthesis() Determines whether the close parenthesis was parsed or not.
| |
| hasSpaceAfterIdentifier | back to summary |
|---|---|
| public boolean hasSpaceAfterIdentifier() Determines whether a whitespace was parsed after the identifier rather than the left parenthesis. This can happen in incomplete query of this form: ABS 4 + 5).
| |
| 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.
| |
| 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
| |
| parseEncapsulatedExpression | back to summary |
|---|---|
| protected abstract void parseEncapsulatedExpression(WordParser wordParser, int whitespaceCount, boolean tolerant) Parses the encapsulated expression by starting at the current position, which is part of the
given
| |
| removeEncapsulatedExpression | back to summary |
|---|---|
| protected abstract void removeEncapsulatedExpression() Removes the encapsulated | |
| shouldParseRightParenthesis | back to summary |
|---|---|
| protected boolean shouldParseRightParenthesis(WordParser wordParser, boolean tolerant) Determines whether the right parenthesis should be parsed or not by this expression. There is a possible case where this expression should have optional left and right parenthesis. If there is no left parenthesis, then it would most likely mean the right parenthesis does not belong to this expression.
| |
| toParsedText | back to summary |
|---|---|
| protected final void toParsedText(StringBuilder writer, boolean actual) Implements abstract org. Doc from org. Generates a string representation of this
| |
| toParsedTextEncapsulatedExpression | back to summary |
|---|---|
| protected abstract void toParsedTextEncapsulatedExpression(StringBuilder writer, boolean actual) Generates a string representation of the encapsulated
| |