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
DataType in this column's configuration |
static java.lang.String |
DEFAULT_VALUE_CONFIG_KEY
Key for setting and retrieving the
default value in 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
Column s are equal if they have the same name. |
java.util.Map |
getConfiguration() |
DataType |
getDataType()
Get the
DataType of 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
DataType
in this column's configurationpublic static final java.lang.String DEFAULT_VALUE_CONFIG_KEY
default value
in 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 null
type
- the DataType
of this column, which MUST NOT be
null
java.lang.NullPointerException
- if either parameter is null
public Column(java.lang.String name, DataType type, Selectable defaultValue) throws java.lang.NullPointerException
name
- the name of this column, which MUST NOT be null
type
- the DataType
of this column, which MUST NOT be
null
config
- name-value pairs that configure this columndefaultValue
- the default value
for this column, which may
be null
java.lang.NullPointerException
- if either name or type is null
public boolean equals(java.lang.Object that)
Column
s are equal if they have the same name.equals
in class java.lang.Object
public 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.Object
public void setSqlType(java.lang.String type)
public java.lang.String toString()
toString
in class java.lang.Object