Package net.sf.jsqlparser.expression
Class CaseExpression
java.lang.Object
net.sf.jsqlparser.parser.ASTNodeAccessImpl
net.sf.jsqlparser.expression.CaseExpression
- All Implemented Interfaces:
Serializable
,Expression
,Model
,ASTNodeAccess
CASE/WHEN expression.
Syntax:
or
CASE
WHEN condition THEN expression
[WHEN condition THEN expression]...
[ELSE expression]
END
or
CASE expression
WHEN condition THEN expression
[WHEN condition THEN expression]...
[ELSE expression]
END
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Expression
private Expression
private boolean
private List
<WhenClause> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ExpressionVisitor expressionVisitor) addWhenClauses
(Collection<? extends WhenClause> whenClauses) addWhenClauses
(WhenClause... whenClauses) <E extends Expression>
EgetElseExpression
(Class<E> type) <E extends Expression>
EgetSwitchExpression
(Class<E> type) boolean
void
setElseExpression
(Expression elseExpression) void
setSwitchExpression
(Expression switchExpression) void
setUsingBrackets
(boolean usingBrackets) void
setWhenClauses
(List<WhenClause> whenClauses) toString()
withElseExpression
(Expression elseExpression) withSwitchExpression
(Expression switchExpression) withUsingBrackets
(boolean usingBrackets) withWhenClauses
(List<WhenClause> whenClauses) Methods inherited from class net.sf.jsqlparser.parser.ASTNodeAccessImpl
appendTo, getASTNode, setASTNode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.jsqlparser.parser.ASTNodeAccess
getASTNode, setASTNode
-
Field Details
-
usingBrackets
private boolean usingBrackets -
switchExpression
-
whenClauses
-
elseExpression
-
-
Constructor Details
-
CaseExpression
public CaseExpression()
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceExpression
-
getSwitchExpression
-
setSwitchExpression
-
getElseExpression
- Returns:
- Returns the elseExpression.
-
setElseExpression
- Parameters:
elseExpression
- The elseExpression to set.
-
getWhenClauses
- Returns:
- Returns the whenClauses.
-
setWhenClauses
- Parameters:
whenClauses
- The whenClauses to set.
-
toString
-
withSwitchExpression
-
withWhenClauses
-
withElseExpression
-
addWhenClauses
-
addWhenClauses
-
getSwitchExpression
-
getElseExpression
-
isUsingBrackets
public boolean isUsingBrackets()- Returns:
- the usingBrackets
-
setUsingBrackets
public void setUsingBrackets(boolean usingBrackets) - Parameters:
usingBrackets
- the usingBrackets to set
-
withUsingBrackets
- Parameters:
usingBrackets
- the usingBrackets to set
-