Package com.alibaba.druid.sql.ast
Class SQLDataTypeImpl
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- com.alibaba.druid.sql.ast.SQLDataTypeImpl
-
- All Implemented Interfaces:
SQLDataType,SQLDbTypedObject,SQLObject,SQLReplaceable
- Direct Known Subclasses:
OracleDataTypeIntervalDay,OracleDataTypeIntervalYear,OracleFunctionDataType,OracleProcedureDataType,SQLCharacterDataType,SQLRecordDataType,SQLUnionDataType,TDDateDataType
public class SQLDataTypeImpl extends SQLObjectImpl implements SQLDataType, SQLDbTypedObject, SQLReplaceable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.alibaba.druid.sql.ast.SQLDataType
SQLDataType.Constants
-
-
Field Summary
Fields Modifier and Type Field Description protected List<SQLExpr>argumentsprotected SQLListExprenumList-
Fields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine
-
-
Constructor Summary
Constructors Constructor Description SQLDataTypeImpl()SQLDataTypeImpl(String name)SQLDataTypeImpl(String name, int precision)SQLDataTypeImpl(String name, int precision, int scale)SQLDataTypeImpl(String name, SQLListExpr enumList)SQLDataTypeImpl(String name, SQLExpr arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaccept0(SQLASTVisitor visitor)voidaddArgument(SQLExpr argument)SQLDataTypeImplclone()voidcloneTo(SQLDataTypeImpl x)booleanequals(Object o)List<SQLExpr>getArguments()DbTypegetDbType()SQLListExprgetEnumList()SQLExprgetIndexBy()StringgetName()BooleangetWithTimeZone()inthashCode()booleanhasKeyLength()booleanisInt()booleanisNumberic()booleanisString()booleanisUnsigned()booleanisWithLocalTimeZone()booleanisZerofill()intjdbcType()longnameHashCode64()booleanreplace(SQLExpr expr, SQLExpr target)voidsetDbType(DbType dbType)voidsetEnumList(SQLListExpr enumList)voidsetIndexBy(SQLExpr x)voidsetName(String name)voidsetUnsigned(boolean unsigned)voidsetWithLocalTimeZone(boolean withLocalTimeZone)voidsetWithTimeZone(Boolean withTimeZone)voidsetZerofill(boolean zerofill)StringtoString()-
Methods inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
accept, acceptChild, acceptChild, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, cloneTo, computeDataType, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getHint, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, output, putAttribute, setHint, setParent, setSource, setSourceLine
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.alibaba.druid.sql.ast.SQLObject
accept, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, output, putAttribute, setParent, setSource
-
-
-
-
Field Detail
-
enumList
protected SQLListExpr enumList
-
-
Constructor Detail
-
SQLDataTypeImpl
public SQLDataTypeImpl()
-
SQLDataTypeImpl
public SQLDataTypeImpl(String name)
-
SQLDataTypeImpl
public SQLDataTypeImpl(String name, int precision)
-
SQLDataTypeImpl
public SQLDataTypeImpl(String name, SQLListExpr enumList)
-
SQLDataTypeImpl
public SQLDataTypeImpl(String name, int precision, int scale)
-
-
Method Detail
-
accept0
protected void accept0(SQLASTVisitor visitor)
- Specified by:
accept0in classSQLObjectImpl
-
getName
public String getName()
- Specified by:
getNamein interfaceSQLDataType
-
nameHashCode64
public long nameHashCode64()
- Specified by:
nameHashCode64in interfaceSQLDataType
-
setName
public void setName(String name)
- Specified by:
setNamein interfaceSQLDataType
-
getEnumList
public SQLListExpr getEnumList()
-
setEnumList
public void setEnumList(SQLListExpr enumList)
-
getArguments
public List<SQLExpr> getArguments()
- Specified by:
getArgumentsin interfaceSQLDataType
-
addArgument
public void addArgument(SQLExpr argument)
-
getWithTimeZone
public Boolean getWithTimeZone()
- Specified by:
getWithTimeZonein interfaceSQLDataType
-
setWithTimeZone
public void setWithTimeZone(Boolean withTimeZone)
- Specified by:
setWithTimeZonein interfaceSQLDataType
-
isWithLocalTimeZone
public boolean isWithLocalTimeZone()
- Specified by:
isWithLocalTimeZonein interfaceSQLDataType
-
setWithLocalTimeZone
public void setWithLocalTimeZone(boolean withLocalTimeZone)
- Specified by:
setWithLocalTimeZonein interfaceSQLDataType
-
getDbType
public DbType getDbType()
- Specified by:
getDbTypein interfaceSQLDataType- Specified by:
getDbTypein interfaceSQLDbTypedObject
-
jdbcType
public int jdbcType()
- Specified by:
jdbcTypein interfaceSQLDataType
-
setDbType
public void setDbType(DbType dbType)
- Specified by:
setDbTypein interfaceSQLDataType
-
clone
public SQLDataTypeImpl clone()
- Specified by:
clonein interfaceSQLDataType- Specified by:
clonein interfaceSQLObject- Overrides:
clonein classSQLObjectImpl
-
cloneTo
public void cloneTo(SQLDataTypeImpl x)
-
toString
public String toString()
- Overrides:
toStringin classSQLObjectImpl
-
isUnsigned
public boolean isUnsigned()
-
setUnsigned
public void setUnsigned(boolean unsigned)
-
isZerofill
public boolean isZerofill()
-
setZerofill
public void setZerofill(boolean zerofill)
-
getIndexBy
public SQLExpr getIndexBy()
-
setIndexBy
public void setIndexBy(SQLExpr x)
-
isInt
public boolean isInt()
- Specified by:
isIntin interfaceSQLDataType
-
isNumberic
public boolean isNumberic()
- Specified by:
isNumbericin interfaceSQLDataType
-
isString
public boolean isString()
- Specified by:
isStringin interfaceSQLDataType
-
hasKeyLength
public boolean hasKeyLength()
- Specified by:
hasKeyLengthin interfaceSQLDataType
-
replace
public boolean replace(SQLExpr expr, SQLExpr target)
- Specified by:
replacein interfaceSQLReplaceable
-
-