Class ColumnBase
- java.lang.Object
-
- com.ibm.fhir.database.utils.model.ColumnBase
-
- Direct Known Subclasses:
BigIntColumn
,BlobColumn
,CharColumn
,ClobColumn
,DoubleColumn
,IntColumn
,SmallIntColumn
,TimestampColumn
,VarbinaryColumn
,VarcharColumn
public abstract class ColumnBase extends Object
An immutable definition of a column in a table
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ColumnBase(String name, boolean nullable)
Protected constructor - for use by subclassesprotected
ColumnBase(String name, boolean nullable, String defaultVal)
Protected constructor - for use by subclasses
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getDefaultVal()
Getter for the default value of this columnString
getName()
Getter for the nameString
getTypeDef(IDatabaseTypeAdapter adapter)
Get the definition of this column as used in create table and create type statements.abstract String
getTypeInfo(IDatabaseTypeAdapter adapter)
Get the type info stringboolean
isNullable()
Getter for the null flagvoid
resetDefaultValue()
resets the default value.
-
-
-
Constructor Detail
-
ColumnBase
protected ColumnBase(String name, boolean nullable)
Protected constructor - for use by subclasses- Parameters:
name
-nullable
-
-
-
Method Detail
-
resetDefaultValue
public void resetDefaultValue()
resets the default value.
-
getName
public String getName()
Getter for the name- Returns:
-
isNullable
public boolean isNullable()
Getter for the null flag- Returns:
-
getDefaultVal
public String getDefaultVal()
Getter for the default value of this column- Returns:
- possibly null
-
getTypeInfo
public abstract String getTypeInfo(IDatabaseTypeAdapter adapter)
Get the type info string- Parameters:
adapter
-- Returns:
-
getTypeDef
public String getTypeDef(IDatabaseTypeAdapter adapter)
Get the definition of this column as used in create table and create type statements. Simply the name followed by the data type- Parameters:
adapter
-- Returns:
-
-