public class Case extends Expression
| Modifier and Type | Field and Description |
|---|---|
List<When> |
whens
List of when clauses.
|
alias, enclosed, joins, ordering, properties, quotes, translator, withNoLock| Modifier and Type | Method and Description |
|---|---|
static Case |
caseWhen()
Returns a new empty case.
|
static Case |
caseWhen(Expression condition,
Expression trueAction)
Returns a new "case when" that does the trueAction considering the condition.
|
Expression |
getFalseAction()
Gets the false action.
|
Case |
otherwise(Expression falseAction)
Sets the false action.
|
String |
translate()
Translates the expression.
|
Case |
when(Expression condition,
Expression action)
Adds a new when clause to this case.
|
alias, asc, desc, enclose, fullOuterJoin, getAlias, getJoins, getOrdering, innerJoin, isAliased, isEnclosed, isQuote, isQuotes, isWithNoLock, leftOuterJoin, rightOuterJoin, unquote, withNoLockpublic Expression getFalseAction()
public static Case caseWhen()
public static Case caseWhen(Expression condition, Expression trueAction)
condition - condition to verify.trueAction - action to be executed if the condition is true.public String translate()
Expressiontranslate in class Expressionpublic Case when(Expression condition, Expression action)
condition - condition to verify.action - action to be executed if the condition is true.public Case otherwise(Expression falseAction)
falseAction - action done if the condition is false.Copyright © 2023 Feedzai. All rights reserved.