when_clause ::= WHEN conditional_expression THEN scalar_expressionsimple_when_clause ::= WHEN scalar_expression THEN scalar_expression| Modifier and Type | Field and Description |
|---|---|
| private boolean | hasSpaceAfterThen
Determines whether a whitespace was parsed after the identifier THEN. |
| private boolean | hasSpaceAfterWhen
Determines whether a whitespace was parsed after the identifier WHEN. |
| private boolean | hasSpaceAfterWhenExpression
Determines whether a whitespace was parsed after the conditional expression. |
| private AbstractExpression | thenExpression
The |
| private String | thenIdentifier
The actual THEN identifier found in the string representation of the JPQL query. |
| private AbstractExpression | whenExpression
The |
| private String | whenIdentifier
The actual WHEN identifier found in the string representation of the JPQL query. |
| Access | Constructor and Description |
|---|---|
| public |
| 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 | 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 CollectionExpression | Returns: The singleWHEN expression 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 String | Returns: The THEN identifier that was actually parsed, or an empty string if it was not parsedReturns the actual THEN found in the string representation of the JPQL query, which has the actual case that was used. |
| public String | Returns: The WHEN identifier that was actually parsedReturns the actual WHEN found in the string representation of the JPQL query, which has the actual case that was used. |
| public JPQLQueryBNF | getQueryBNF()
Implements org. Expression.
|
| public AbstractExpression | Returns: The expression representing the expression executed if the predicate is trueReturns the |
| public AbstractExpression | Returns: The expression following the WHEN identifierReturns the |
| public boolean | Returns: true if there was a whitespace after THEN; false otherwiseDetermines whether a whitespace was parsed after THEN. |
| public boolean | Returns: true if there was a whitespace after WHEN; false otherwiseDetermines whether a whitespace was parsed after WHEN. |
| public boolean | Returns: true if there was a whitespace after the conditional expression;
false otherwiseDetermines whether a whitespace was parsed after the conditional expression. |
| public boolean | Returns: true if the identifier THEN was parsed; false otherwiseDetermines whether the identifier THEN was part of the query. |
| public boolean | Returns: true the THEN expression was parsed; false if nothing
was parsedDetermines whether the THEN expression of the query was parsed. |
| public boolean | Returns: true the conditional expression was parsed; false if nothing
was parsedDetermines whether the conditional 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 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 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.
|
| hasSpaceAfterThen | back to summary |
|---|---|
| private boolean hasSpaceAfterThen Determines whether a whitespace was parsed after the identifier THEN. | |
| hasSpaceAfterWhen | back to summary |
|---|---|
| private boolean hasSpaceAfterWhen Determines whether a whitespace was parsed after the identifier WHEN. | |
| hasSpaceAfterWhenExpression | back to summary |
|---|---|
| private boolean hasSpaceAfterWhenExpression Determines whether a whitespace was parsed after the conditional expression. | |
| thenExpression | back to summary |
|---|---|
| private AbstractExpression thenExpression The | |
| thenIdentifier | back to summary |
|---|---|
| private String thenIdentifier The actual THEN identifier found in the string representation of the JPQL query. | |
| whenExpression | back to summary |
|---|---|
| private AbstractExpression whenExpression The | |
| whenIdentifier | back to summary |
|---|---|
| private String whenIdentifier The actual WHEN identifier found in the string representation of the JPQL query. | |
| WhenClause | back to summary |
|---|---|
| public WhenClause(AbstractExpression parent) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(ExpressionVisitor visitor) Implements org. Doc from org. Visits this
| |
| 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
| |
| buildWhenCollectionExpression | back to summary |
|---|---|
| public CollectionExpression buildWhenCollectionExpression() Creates a new
| |
| findQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF findQueryBNF(Expression expression) Overrides org. Implements org. Doc from org. Retrieves the
| |
| getActualThenIdentifier | back to summary |
|---|---|
| public String getActualThenIdentifier() Returns the actual THEN found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getActualWhenIdentifier | back to summary |
|---|---|
| public String getActualWhenIdentifier() Returns the actual WHEN found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF getQueryBNF() Implements org. Doc from org. Returns the BNF of this
| |
| getThenExpression | back to summary |
|---|---|
| public AbstractExpression getThenExpression() Returns the
| |
| getWhenExpression | back to summary |
|---|---|
| public AbstractExpression getWhenExpression() Returns the
| |
| hasSpaceAfterThen | back to summary |
|---|---|
| public boolean hasSpaceAfterThen() Determines whether a whitespace was parsed after THEN.
| |
| hasSpaceAfterWhen | back to summary |
|---|---|
| public boolean hasSpaceAfterWhen() Determines whether a whitespace was parsed after WHEN.
| |
| hasSpaceAfterWhenExpression | back to summary |
|---|---|
| public boolean hasSpaceAfterWhenExpression() Determines whether a whitespace was parsed after the conditional expression.
| |
| hasThen | back to summary |
|---|---|
| public boolean hasThen() Determines whether the identifier THEN was part of the query.
| |
| hasThenExpression | back to summary |
|---|---|
| public boolean hasThenExpression() Determines whether the THEN expression of the query was parsed.
| |
| hasWhenExpression | back to summary |
|---|---|
| public boolean hasWhenExpression() Determines whether the conditional 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.
| |
| 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
| |
| toParsedText | back to summary |
|---|---|
| protected void toParsedText(StringBuilder writer, boolean actual) Implements abstract org. Doc from org. Generates a string representation of this
| |