org.xerial.db.datatype
Class DataTypeBase
java.lang.Object
org.xerial.db.datatype.DataTypeBase
- All Implemented Interfaces:
- Comparable<DataType>, DataType
- Direct Known Subclasses:
- BooleanType, DoubleType, IntegerType, LongType, PasswordType, StringListType, StringType, TextType
public abstract class DataTypeBase
- extends Object
- implements DataType
- Author:
- leo
DataTypeBase
public DataTypeBase(String name)
DataTypeBase
public DataTypeBase(String name,
boolean isPrimaryKey)
DataTypeBase
public DataTypeBase(String name,
boolean isPrimaryKey,
boolean isNotNull)
compareTo
public int compareTo(DataType o)
- Specified by:
compareTo in interface Comparable<DataType>
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
getName
public String getName()
- Description copied from interface:
DataType
- Gets the parameter name (column name in a relation) of the type
- Specified by:
getName in interface DataType
- Returns:
- the parameter name
setPrimaryKey
public void setPrimaryKey(boolean isPrimaryKey)
- Specified by:
setPrimaryKey in interface DataType
isPrimaryKey
public boolean isPrimaryKey()
- Description copied from interface:
DataType
- is primary key?
- Specified by:
isPrimaryKey in interface DataType
- Returns:
- true if this data type is used as a primary key, otherwise false.
setNotNull
public void setNotNull(boolean isNotNull)
- Specified by:
setNotNull in interface DataType
isNotNull
public boolean isNotNull()
- Description copied from interface:
DataType
- allowed to be null?
- Specified by:
isNotNull in interface DataType
- Returns:
- true if this data type value cannot be null, otherwise false.
toString
public String toString()
- Overrides:
toString in class Object

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