net.sf.jsqlparser.expression
Class CaseExpression

java.lang.Object
  extended by net.sf.jsqlparser.expression.CaseExpression
All Implemented Interfaces:
Expression

public class CaseExpression
extends java.lang.Object
implements Expression

CASE/WHEN expression. Syntax:

 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: https://aurora.vcu.edu/db2help/db2s0/frame3.htm#casexp http://sybooks.sybase.com/onlinebooks/group-as/asg1251e/commands/@ebt-link;pt=5954?target=%25N%15_52628_START_RESTART_N%25

Author:
Havard Rast Blok

Field Summary
private  Expression elseExpression
           
private  Expression switchExpression
           
private  java.util.List whenClauses
           
 
Constructor Summary
CaseExpression()
           
 
Method Summary
 void accept(ExpressionVisitor expressionVisitor)
           
 Expression getElseExpression()
           
 Expression getSwitchExpression()
           
 java.util.List getWhenClauses()
           
 void setElseExpression(Expression elseExpression)
           
 void setSwitchExpression(Expression switchExpression)
           
 void setWhenClauses(java.util.List whenClauses)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

switchExpression

private Expression switchExpression

whenClauses

private java.util.List whenClauses

elseExpression

private Expression elseExpression
Constructor Detail

CaseExpression

public CaseExpression()
Method Detail

accept

public void accept(ExpressionVisitor expressionVisitor)
Specified by:
accept in interface Expression

getSwitchExpression

public Expression getSwitchExpression()
Returns:
Returns the switchExpression.

setSwitchExpression

public void setSwitchExpression(Expression switchExpression)
Parameters:
switchExpression - The switchExpression to set.

getElseExpression

public Expression getElseExpression()
Returns:
Returns the elseExpression.

setElseExpression

public void setElseExpression(Expression elseExpression)
Parameters:
elseExpression - The elseExpression to set.

getWhenClauses

public java.util.List getWhenClauses()
Returns:
Returns the whenClauses.

setWhenClauses

public void setWhenClauses(java.util.List whenClauses)
Parameters:
whenClauses - The whenClauses to set.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object