Class When
- java.lang.Object
-
- com.feedzai.commons.sql.abstraction.dml.Expression
-
- com.feedzai.commons.sql.abstraction.dml.When
-
- All Implemented Interfaces:
Serializable
public class When extends Expression
- Since:
- 2.2.3
- Author:
- Francisco Santos (francisco.santos@feedzai.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description ExpressionactionThe action to be executed if the condition is true.ExpressionconditionThe condition to verify.-
Fields inherited from class com.feedzai.commons.sql.abstraction.dml.Expression
alias, enclosed, joins, ordering, properties, quotes, translator, withNoLock
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringtranslate()Translates the expression.static Whenwhen(Expression condition, Expression action)Creates a new When expression.-
Methods inherited from class com.feedzai.commons.sql.abstraction.dml.Expression
alias, asc, desc, enclose, fullOuterJoin, getAlias, getJoins, getOrdering, innerJoin, isAliased, isEnclosed, isQuote, isQuotes, isWithNoLock, leftOuterJoin, rightOuterJoin, unquote, withNoLock
-
-
-
-
Field Detail
-
condition
public final Expression condition
The condition to verify.
-
action
public final Expression action
The action to be executed if the condition is true.
-
-
Method Detail
-
when
public static When when(Expression condition, Expression action)
Creates a new When expression.- Parameters:
condition- condition to verify.action- action to be executed if the condition is true.- Returns:
- a new when.
-
translate
public String translate()
Description copied from class:ExpressionTranslates the expression.- Specified by:
translatein classExpression- Returns:
- A translation of the implementing expression.
-
-