- java.lang.Object
-
- net.sf.jsqlparser.parser.ASTNodeAccessImpl
-
- net.sf.jsqlparser.expression.CastExpression
-
- All Implemented Interfaces:
Serializable,Expression,Model,net.sf.jsqlparser.parser.ASTNodeAccess
public class CastExpression extends net.sf.jsqlparser.parser.ASTNodeAccessImpl implements Expression
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCastExpression.DataType
-
Constructor Summary
Constructors Constructor Description CastExpression()CastExpression(String keyword)CastExpression(String dataType, String value)CastExpression(String keyword, Expression leftExpression, String dataType)CastExpression(Expression leftExpression, String dataType)CastExpression(ColDataType colDataType, Double value)CastExpression(ColDataType colDataType, Long value)CastExpression(ColDataType colDataType, String value)
-
Method Summary
-
Methods inherited from class net.sf.jsqlparser.parser.ASTNodeAccessImpl
appendTo, getASTNode, getParent, getParent, setASTNode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.jsqlparser.expression.Expression
accept
-
-
-
-
Field Detail
-
keyword
public String keyword
-
-
Constructor Detail
-
CastExpression
public CastExpression(String keyword, Expression leftExpression, String dataType)
-
CastExpression
public CastExpression(ColDataType colDataType, String value)
-
CastExpression
public CastExpression(ColDataType colDataType, Long value)
-
CastExpression
public CastExpression(ColDataType colDataType, Double value)
-
CastExpression
public CastExpression(Expression leftExpression, String dataType)
-
CastExpression
public CastExpression(String keyword)
-
CastExpression
public CastExpression()
-
-
Method Detail
-
isOf
public static boolean isOf(ColDataType colDataType, CastExpression.DataType... types)
-
isTime
public static boolean isTime(ColDataType colDataType)
-
isTimeStamp
public static boolean isTimeStamp(ColDataType colDataType)
-
isDate
public static boolean isDate(ColDataType colDataType)
-
isBLOB
public static boolean isBLOB(ColDataType colDataType)
-
isFloat
public static boolean isFloat(ColDataType colDataType)
-
isInteger
public static boolean isInteger(ColDataType colDataType)
-
isDecimal
public static boolean isDecimal(ColDataType colDataType)
-
isText
public static boolean isText(ColDataType colDataType)
-
getColDataType
public ColDataType getColDataType()
-
setColDataType
public void setColDataType(ColDataType colDataType)
-
getColumnDefinitions
public ArrayList<ColumnDefinition> getColumnDefinitions()
-
addColumnDefinition
public void addColumnDefinition(ColumnDefinition columnDefinition)
-
getLeftExpression
public Expression getLeftExpression()
-
setLeftExpression
public void setLeftExpression(Expression expression)
-
isImplicitCast
public boolean isImplicitCast()
-
setImplicitCast
public CastExpression setImplicitCast(boolean implicitCast)
-
accept
public <T,S> T accept(ExpressionVisitor<T> expressionVisitor, S context)
- Specified by:
acceptin interfaceExpression
-
isUseCastKeyword
@Deprecated public boolean isUseCastKeyword()
Deprecated.
-
setUseCastKeyword
@Deprecated public void setUseCastKeyword(boolean useCastKeyword)
Deprecated.
-
getFormat
public String getFormat()
-
setFormat
public CastExpression setFormat(String format)
-
withType
public CastExpression withType(ColDataType type)
-
withUseCastKeyword
public CastExpression withUseCastKeyword(boolean useCastKeyword)
-
withLeftExpression
public CastExpression withLeftExpression(Expression leftExpression)
-
getLeftExpression
public <E extends Expression> E getLeftExpression(Class<E> type)
-
isOf
public boolean isOf(CastExpression anotherCast)
-
isOf
public boolean isOf(CastExpression.DataType... types)
-
isTime
public boolean isTime()
-
isTimeStamp
public boolean isTimeStamp()
-
isDate
public boolean isDate()
-
isBLOB
public boolean isBLOB()
-
isFloat
public boolean isFloat()
-
isInteger
public boolean isInteger()
-
isDecimal
public boolean isDecimal()
-
isText
public boolean isText()
-
-