Class Cast
- java.lang.Object
-
- com.feedzai.commons.sql.abstraction.dml.Expression
-
- com.feedzai.commons.sql.abstraction.dml.Cast
-
- All Implemented Interfaces:
Serializable
public class Cast extends Expression
The cast expression.- Since:
- 2.4.0
- Author:
- Francisco Santos (francisco.santos@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 Cast(Expression expression, DbColumnType type)Creates a new cast expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpressiongetExpression()Gets the expression.DbColumnTypegetType()Gets the type to be converted.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
-
Cast
public Cast(Expression expression, DbColumnType type)
Creates a new cast expression.- Parameters:
expression- the expression.type- the type to be converted.
-
-
Method Detail
-
getExpression
public Expression getExpression()
Gets the expression.- Returns:
- The expression.
-
getType
public DbColumnType getType()
Gets the type to be converted.- Returns:
- The type to be converted.
-
translate
public String translate()
Description copied from class:ExpressionTranslates the expression.- Specified by:
translatein classExpression- Returns:
- A translation of the implementing expression.
-
-