net.sf.basedb.core.query
Class WhenStatement
java.lang.Object
net.sf.basedb.core.query.WhenStatement
public class WhenStatement
- extends Object
Create a WHEN statement to be used in a CaseExpression
.
- Version:
- 2.0
- Author:
- nicklas
- See Also:
Expressions.caseWhen(Expression, WhenStatement[])
- Last modified
- $Date: 2008-09-05 17:16:27 +0200 (Fri, 05 Sep 2008) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
condition
private final Restriction condition
value
private final Expression value
WhenStatement
public WhenStatement(Restriction condition,
Expression value)
- Create a new
WhenStatement
- Parameters:
condition
- The condition that is controlling if this
value is returned or not, null is not allowedvalue
- The value to return if the condition is TRUE,
null is not allowed
getCondition
public Restriction getCondition()
- Get the condition of this statement.
- Returns:
- A
Restriction
object
getValue
public Expression getValue()
- Get the value returned by this statement
- Returns:
- An
Expression
object