Class Coalesce
- java.lang.Object
-
- com.feedzai.commons.sql.abstraction.dml.Expression
-
- com.feedzai.commons.sql.abstraction.dml.Coalesce
-
- All Implemented Interfaces:
Serializable
public class Coalesce extends Expression
Represents the coalesce operator.- Since:
- 2.0.0
- Author:
- Rui Vilao (rui.vilao@feedzai.com)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.feedzai.commons.sql.abstraction.dml.Expression
alias, enclosed, joins, ordering, properties, quotes, translator, withNoLock
-
-
Constructor Summary
Constructors Constructor Description Coalesce(Expression exp, Expression... alternative)Creates a new instance ofCoalesce.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression[]getAlternative()Gets the alternative expressions.ExpressiongetExp()Gets the expression to test.Stringtranslate()Translates the 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
-
-
-
-
Constructor Detail
-
Coalesce
public Coalesce(Expression exp, Expression... alternative)
Creates a new instance ofCoalesce.- Parameters:
exp- The expression to test.alternative- The alternative expressions.
-
-
Method Detail
-
getExp
public Expression getExp()
Gets the expression to test.- Returns:
- The expression to test.
-
getAlternative
public Expression[] getAlternative()
Gets the alternative expressions.- Returns:
- The alternative expressions.
-
translate
public String translate()
Description copied from class:ExpressionTranslates the expression.- Specified by:
translatein classExpression- Returns:
- A translation of the implementing expression.
-
-