public class Column
extends java.lang.Object
implements java.io.Serializable
Table.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COLUMN_SQL_TYPE_CONFIG_KEY
Key for setting and retrieving the sqlType in this column's configuration
|
static java.lang.String |
DATA_TYPE_CONFIG_KEY
Key for setting and retrieving the
DataTypein this column's configuration |
static java.lang.String |
DEFAULT_VALUE_CONFIG_KEY
Key for setting and retrieving the
default valuein this
column's configuration |
static java.lang.String |
GENERATED_ALWAYS |
static java.lang.String |
GENERATED_BY_DEFAULT |
static java.lang.String |
GENERATED_COLUMN_TYPE
Key for setting and retrieving generated column expression
|
static java.lang.String |
IDENTITY_GENERATION_TYPE
Key for setting and retrieving the Identity column generation type
|
static java.lang.String |
NAME_CONFIG_KEY
Key for setting and retrieving the name in this column's configuration
|
| Constructor and Description |
|---|
Column(java.lang.String name,
DataType type)
Create column with the given name and type .
|
Column(java.lang.String name,
DataType type,
Selectable defaultValue)
Create column with the given name and type .
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object that)
Two
Columns are equal if they have the same name. |
java.util.Map |
getConfiguration() |
DataType |
getDataType()
Get the
DataTypeof this column. |
Selectable |
getDefault() |
java.lang.String |
getGeneratedColType() |
java.lang.String |
getIdentityType() |
java.lang.String |
getName()
Get the name of this column.
|
int |
getScale() |
int |
getSize() |
java.lang.String |
getSqlType() |
boolean |
hasDefault() |
int |
hashCode() |
boolean |
isDerivedColumn() |
boolean |
isGeneratedAlways() |
boolean |
isGeneratedByDefault() |
boolean |
isIdentityColumn() |
void |
setGeneratedColType(java.lang.String type) |
void |
setIdentityType(java.lang.String type) |
void |
setSqlType(java.lang.String type) |
java.lang.String |
toString() |
public static final java.lang.String COLUMN_SQL_TYPE_CONFIG_KEY
public static final java.lang.String DATA_TYPE_CONFIG_KEY
DataTypein this column's configurationpublic static final java.lang.String DEFAULT_VALUE_CONFIG_KEY
default valuein this
column's configurationpublic static final java.lang.String NAME_CONFIG_KEY
public static final java.lang.String IDENTITY_GENERATION_TYPE
public static final java.lang.String GENERATED_ALWAYS
public static final java.lang.String GENERATED_BY_DEFAULT
public static final java.lang.String GENERATED_COLUMN_TYPE
public Column(java.lang.String name,
DataType type)
throws java.lang.NullPointerException
name - the name of this column, which MUST NOT be nulltype - the DataTypeof this column, which MUST NOT be
nulljava.lang.NullPointerException - if either parameter is nullpublic Column(java.lang.String name,
DataType type,
Selectable defaultValue)
throws java.lang.NullPointerException
name - the name of this column, which MUST NOT be nulltype - the DataTypeof this column, which MUST NOT be
nullconfig - name-value pairs that configure this columndefaultValue - the default valuefor this column, which may
be nulljava.lang.NullPointerException - if either name or type is nullpublic boolean equals(java.lang.Object that)
Columns are equal if they have the same name.equals in class java.lang.Objectpublic final java.util.Map getConfiguration()
public final Selectable getDefault()
public final java.lang.String getName()
public int getScale()
public int getSize()
public java.lang.String getSqlType()
public boolean hasDefault()
public boolean isIdentityColumn()
public boolean isGeneratedAlways()
public boolean isGeneratedByDefault()
public boolean isDerivedColumn()
public void setGeneratedColType(java.lang.String type)
public java.lang.String getGeneratedColType()
public final java.lang.String getIdentityType()
public void setIdentityType(java.lang.String type)
public int hashCode()
hashCode in class java.lang.Objectpublic void setSqlType(java.lang.String type)
public java.lang.String toString()
toString in class java.lang.Object