general_case_expression ::= CASE when_clause {when_clause}* ELSE scalar_expression ENDsimple_case_expression ::= CASE case_operand simple_when_clause {simple_when_clause}* ELSE scalar_expression END| Modifier and Type | Class and Description |
|---|---|
| private static enum | CaseExpression.ParsingType
A enumeration used to determine how |
| Modifier and Type | Field and Description |
|---|---|
| private String | caseIdentifier
The actual CASE identifier found in the string representation of the JPQL query. |
| private AbstractExpression | caseOperand
The |
| private AbstractExpression | elseExpression
The |
| private String | elseIdentifier
The actual ELSE identifier found in the string representation of the JPQL query. |
| private String | endIdentifier
The actual END identifier found in the string representation of the JPQL query. |
| private boolean | hasSpaceAfterCase
Determines whether a whitespace was parsed after CASE. |
| private boolean | hasSpaceAfterCaseOperand
Determines whether a whitespace was parsed after the case operand. |
| private boolean | hasSpaceAfterElse
Determines whether a whitespace was parsed after ELSE. |
| private boolean | hasSpaceAfterElseExpression
Determines whether a whitespace was parsed after the BETWEEN expression. |
| private boolean | hasSpaceAfterWhenClauses
Determines whether a whitespace was parsed after WHEN clause. |
| private CaseExpression. | parsingType
Used to determine how to check if the parsing is complete. |
| private AbstractExpression | whenClauses
The |
| 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 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 CASE identifier that was actually parsedReturns the actual CASE identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public String | Returns: The ELSE identifier that was actually parsed, or an empty string if it was not parsedReturns the actual ELSE identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public String | Returns: The END identifier that was actually parsed, or an empty string if it was not parsedReturns the actual END identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public Expression | Returns: The expression that was parsed representing the CASE operandReturns the |
| public AbstractExpression | Returns: The expression that was parsed representing the ELSE operandReturns the |
| public JPQLQueryBNF | getQueryBNF()
Implements org. Expression.
|
| public AbstractExpression | Returns: The expression that was parsed representing the WHEN clausesReturns the |
| public boolean | Returns: true if the CASE operand was parsed; false otherwiseDetermines whether the CASE operand was parsed. |
| public boolean | Returns: true if the identifier ELSE was parsed; false
otherwiseDetermines whether the identifier ELSE was parsed. |
| public boolean | Returns: true if the ELSE expression was parsed; false
otherwiseDetermines whether the ELSE expression was parsed. |
| public boolean | Returns: true if the identifier END was parsed; false otherwiseDetermines whether the identifier END was parsed. |
| public boolean | Returns: true if there was a whitespace after CASE; false
otherwiseDetermines whether a whitespace was parsed after CASE. |
| public boolean | Returns: true if there was a whitespace after the case operand; false
otherwiseDetermines whether a whitespace was parsed after the case operand. |
| public boolean | Returns: true if there was a whitespace after ELSE; false
otherwiseDetermines whether a whitespace was parsed after ELSE. |
| public boolean | Returns: true if there was a whitespace after the else expression;
false otherwiseDetermines whether a whitespace was parsed after the else expression. |
| public boolean | Returns: true if there was a whitespace after the WHEN
clause; false otherwiseDetermines whether a whitespace was parsed after the WHEN clause. |
| public boolean | Returns: true if the WHEN clauses were parsed;
false otherwiseDetermines whether the WHEN clauses were 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.
|
| caseIdentifier | back to summary |
|---|---|
| private String caseIdentifier The actual CASE identifier found in the string representation of the JPQL query. | |
| caseOperand | back to summary |
|---|---|
| private AbstractExpression caseOperand The | |
| elseExpression | back to summary |
|---|---|
| private AbstractExpression elseExpression The | |
| elseIdentifier | back to summary |
|---|---|
| private String elseIdentifier The actual ELSE identifier found in the string representation of the JPQL query. | |
| endIdentifier | back to summary |
|---|---|
| private String endIdentifier The actual END identifier found in the string representation of the JPQL query. | |
| hasSpaceAfterCase | back to summary |
|---|---|
| private boolean hasSpaceAfterCase Determines whether a whitespace was parsed after CASE. | |
| hasSpaceAfterCaseOperand | back to summary |
|---|---|
| private boolean hasSpaceAfterCaseOperand Determines whether a whitespace was parsed after the case operand. | |
| hasSpaceAfterElse | back to summary |
|---|---|
| private boolean hasSpaceAfterElse Determines whether a whitespace was parsed after ELSE. | |
| hasSpaceAfterElseExpression | back to summary |
|---|---|
| private boolean hasSpaceAfterElseExpression Determines whether a whitespace was parsed after the BETWEEN expression. | |
| hasSpaceAfterWhenClauses | back to summary |
|---|---|
| private boolean hasSpaceAfterWhenClauses Determines whether a whitespace was parsed after WHEN clause. | |
| parsingType | back to summary |
|---|---|
| private CaseExpression. Used to determine how to check if the parsing is complete. | |
| whenClauses | back to summary |
|---|---|
| private AbstractExpression whenClauses The | |
| CaseExpression | back to summary |
|---|---|
| public CaseExpression(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
| |
| findQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF findQueryBNF(Expression expression) Overrides org. Implements org. Doc from org. Retrieves the
| |
| getActualCaseIdentifier | back to summary |
|---|---|
| public String getActualCaseIdentifier() Returns the actual CASE identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getActualElseIdentifier | back to summary |
|---|---|
| public String getActualElseIdentifier() Returns the actual ELSE identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getActualEndIdentifier | back to summary |
|---|---|
| public String getActualEndIdentifier() Returns the actual END identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getCaseOperand | back to summary |
|---|---|
| public Expression getCaseOperand() Returns the
| |
| getElseExpression | back to summary |
|---|---|
| public AbstractExpression getElseExpression() Returns the
| |
| getQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF getQueryBNF() Implements org. Doc from org. Returns the BNF of this
| |
| getWhenClauses | back to summary |
|---|---|
| public AbstractExpression getWhenClauses() Returns the
| |
| hasCaseOperand | back to summary |
|---|---|
| public boolean hasCaseOperand() Determines whether the CASE operand was parsed.
| |
| hasElse | back to summary |
|---|---|
| public boolean hasElse() Determines whether the identifier ELSE was parsed.
| |
| hasElseExpression | back to summary |
|---|---|
| public boolean hasElseExpression() Determines whether the ELSE expression was parsed.
| |
| hasEnd | back to summary |
|---|---|
| public boolean hasEnd() Determines whether the identifier END was parsed.
| |
| hasSpaceAfterCase | back to summary |
|---|---|
| public boolean hasSpaceAfterCase() Determines whether a whitespace was parsed after CASE.
| |
| hasSpaceAfterCaseOperand | back to summary |
|---|---|
| public boolean hasSpaceAfterCaseOperand() Determines whether a whitespace was parsed after the case operand.
| |
| hasSpaceAfterElse | back to summary |
|---|---|
| public boolean hasSpaceAfterElse() Determines whether a whitespace was parsed after ELSE.
| |
| hasSpaceAfterElseExpression | back to summary |
|---|---|
| public boolean hasSpaceAfterElseExpression() Determines whether a whitespace was parsed after the else expression.
| |
| hasSpaceAfterWhenClauses | back to summary |
|---|---|
| public boolean hasSpaceAfterWhenClauses() Determines whether a whitespace was parsed after the WHEN clause.
| |
| hasWhenClauses | back to summary |
|---|---|
| public boolean hasWhenClauses() Determines whether the WHEN clauses were 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
| |
CaseExpression#isParsingComplete(WordParser, String, Expression)
should behaves.
| Modifier and Type | Field and Description |
|---|---|
| public static final CaseExpression. | |
| public static final CaseExpression. | |
| public static final CaseExpression. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CaseExpression. | |
| public static CaseExpression. |
| CASE | back to summary |
|---|---|
| public static final CaseExpression. | |
| ELSE | back to summary |
|---|---|
| public static final CaseExpression. | |
| WHEN | back to summary |
|---|---|
| public static final CaseExpression. | |
| ParsingType | back to summary |
|---|---|
| private ParsingType() | |
| valueOf | back to summary |
|---|---|
| public static CaseExpression. | |
| values | back to summary |
|---|---|
| public static CaseExpression. | |