org.eclipse.datatools.sqltools.sql.reference
Interface IDatatype


public interface IDatatype

Represents a data type object.

Author:
Dafan Yang

Method Summary
 boolean allowNull()
          To test if this data type can have null value
 IDatatype getBaseType()
          Gets the base type of this data type,if this type is UDT,then return it's base type otherwise(it is system type),return itself
 java.lang.Object getDefaultValue()
          Gets the default value of this data type
 int getLength()
          Gets the physical lenght of this type
 int getPrecision()
          Gets the precision of this type, if precision is -1, then no precision defined
 int getScale()
          Gets the scale of this type, if precision is -1, then no scale defined
 boolean isUDT()
          To test if this data type is user-defined datatype or not
 void setAllowNull(boolean allowNull)
           
 void setBaseType(IDatatype baseType)
           
 void setDefaultValue(java.lang.Object defaultValue)
           
 void setLength(int length)
           
 void setPrecision(int precision)
           
 void setScale(int scale)
           
 void setUDT(boolean isUDT)
           
 

Method Detail

isUDT

boolean isUDT()
To test if this data type is user-defined datatype or not


setUDT

void setUDT(boolean isUDT)

getBaseType

IDatatype getBaseType()
Gets the base type of this data type,if this type is UDT,then return it's base type otherwise(it is system type),return itself


setBaseType

void setBaseType(IDatatype baseType)

getDefaultValue

java.lang.Object getDefaultValue()
Gets the default value of this data type


setDefaultValue

void setDefaultValue(java.lang.Object defaultValue)

getLength

int getLength()
Gets the physical lenght of this type


setLength

void setLength(int length)

allowNull

boolean allowNull()
To test if this data type can have null value


setAllowNull

void setAllowNull(boolean allowNull)

getPrecision

int getPrecision()
Gets the precision of this type, if precision is -1, then no precision defined


setPrecision

void setPrecision(int precision)

getScale

int getScale()
Gets the scale of this type, if precision is -1, then no scale defined


setScale

void setScale(int scale)