org.xerial.db.datatype
Interface DataType

All Superinterfaces:
Comparable<DataType>
All Known Implementing Classes:
BooleanType, DataTypeBase, DoubleType, IntegerType, LongType, PasswordType, StringListType, StringType, TextType

public interface DataType
extends Comparable<DataType>

DataType interface is used to represtent various data types, e.g., integer, DataTime, Color, etc. DataTypes are sorted in the order of parameter name

Author:
leo

Method Summary
 String getName()
          Gets the parameter name (column name in a relation) of the type
 String getTypeName()
          Gets the type name of this data type, e.g., integer, boolean, etc.
 boolean isNotNull()
          allowed to be null?
 boolean isPrimaryKey()
          is primary key?
 void setNotNull(boolean isNotNull)
           
 void setPrimaryKey(boolean isPrimatyKey)
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getName

String getName()
Gets the parameter name (column name in a relation) of the type

Returns:
the parameter name

getTypeName

String getTypeName()
Gets the type name of this data type, e.g., integer, boolean, etc.

Returns:
the type name

isPrimaryKey

boolean isPrimaryKey()
is primary key?

Returns:
true if this data type is used as a primary key, otherwise false.

isNotNull

boolean isNotNull()
allowed to be null?

Returns:
true if this data type value cannot be null, otherwise false.

setPrimaryKey

void setPrimaryKey(boolean isPrimatyKey)

setNotNull

void setNotNull(boolean isNotNull)


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.