org.axiondb

Class Column

public class Column extends Object implements Serializable

Describes a column within a Table.

Version: $Revision: 1.34 $ $Date: 2005/12/20 18:32:40 $

Author: Chuck Burdick Rodney Waldhoff Ahimanikya Satapathy

Field Summary
static StringCOLUMN_SQL_TYPE_CONFIG_KEY
Key for setting and retrieving the sqlType in this column's configuration
static StringDATA_TYPE_CONFIG_KEY
Key for setting and retrieving the DataTypein this column's configuration
static StringDEFAULT_VALUE_CONFIG_KEY
Key for setting and retrieving the default valuein this column's configuration
static StringGENERATED_ALWAYS
static StringGENERATED_BY_DEFAULT
static StringGENERATED_COLUMN_TYPE
Key for setting and retrieving generated column expression
static StringIDENTITY_GENERATION_TYPE
Key for setting and retrieving the Identity column generation type
static StringNAME_CONFIG_KEY
Key for setting and retrieving the name in this column's configuration
Constructor Summary
Column(String name, DataType type)
Create column with the given name and type .
Column(String name, DataType type, Selectable defaultValue)
Create column with the given name and type .
Method Summary
booleanequals(Object that)
Two Columns are equal if they have the same name.
MapgetConfiguration()
DataTypegetDataType()
Get the DataTypeof this column.
SelectablegetDefault()
StringgetGeneratedColType()
StringgetIdentityType()
StringgetName()
Get the name of this column.
intgetScale()
intgetSize()
StringgetSqlType()
booleanhasDefault()
inthashCode()
booleanisDerivedColumn()
booleanisGeneratedAlways()
booleanisGeneratedByDefault()
booleanisIdentityColumn()
voidsetGeneratedColType(String type)
voidsetIdentityType(String type)
voidsetSqlType(String type)
StringtoString()

Field Detail

COLUMN_SQL_TYPE_CONFIG_KEY

public static final String COLUMN_SQL_TYPE_CONFIG_KEY
Key for setting and retrieving the sqlType in this column's configuration

DATA_TYPE_CONFIG_KEY

public static final String DATA_TYPE_CONFIG_KEY
Key for setting and retrieving the DataTypein this column's configuration

DEFAULT_VALUE_CONFIG_KEY

public static final String DEFAULT_VALUE_CONFIG_KEY
Key for setting and retrieving the default valuein this column's configuration

GENERATED_ALWAYS

public static final String GENERATED_ALWAYS

GENERATED_BY_DEFAULT

public static final String GENERATED_BY_DEFAULT

GENERATED_COLUMN_TYPE

public static final String GENERATED_COLUMN_TYPE
Key for setting and retrieving generated column expression

IDENTITY_GENERATION_TYPE

public static final String IDENTITY_GENERATION_TYPE
Key for setting and retrieving the Identity column generation type

NAME_CONFIG_KEY

public static final String NAME_CONFIG_KEY
Key for setting and retrieving the name in this column's configuration

Constructor Detail

Column

public Column(String name, DataType type)
Create column with the given name and type .

Parameters: name the name of this column, which MUST NOT be null type the DataTypeof this column, which MUST NOT be null

Throws: NullPointerException if either parameter is null

Column

public Column(String name, DataType type, Selectable defaultValue)
Create column with the given name and type .

Parameters: name the name of this column, which MUST NOT be null type the DataTypeof this column, which MUST NOT be null config name-value pairs that configure this column defaultValue the default valuefor this column, which may be null

Throws: NullPointerException if either name or type is null

Method Detail

equals

public boolean equals(Object that)
Two Columns are equal if they have the same name.

getConfiguration

public final Map getConfiguration()

getDataType

public final DataType getDataType()
Get the DataTypeof this column.

getDefault

public final Selectable getDefault()

getGeneratedColType

public String getGeneratedColType()

getIdentityType

public final String getIdentityType()

getName

public final String getName()
Get the name of this column.

getScale

public int getScale()

getSize

public int getSize()

getSqlType

public String getSqlType()

hasDefault

public boolean hasDefault()

hashCode

public int hashCode()

isDerivedColumn

public boolean isDerivedColumn()

isGeneratedAlways

public boolean isGeneratedAlways()

isGeneratedByDefault

public boolean isGeneratedByDefault()

isIdentityColumn

public boolean isIdentityColumn()

setGeneratedColType

public void setGeneratedColType(String type)

setIdentityType

public void setIdentityType(String type)

setSqlType

public void setSqlType(String type)

toString

public String toString()