- All Implemented Interfaces:
Column
Representation of a column in a table.
-
Field Summary
Fields
(package private) boolean
(package private) boolean
(package private) boolean
(package private) int
(package private) boolean
(package private) boolean
-
Constructor Summary
Constructors
-
Method Summary
Accessor for the metadata for this column (if any).
Accessor for the role that this column serves (if known).
Accessor for the default Value
Accessor for the JDBC Type used for this column.
Accessor for the mapping (and hence member) that owns this column.
Accessor for the column name.
int
Accessor for the position of this column in the table (if specified).
Accessor for the table for this column.
Accessor for the native type name in the datastore for this column.
boolean
Accessor for whether the column is defaultable.
boolean
boolean
Accessor for whether the column is nullable in the datastore.
boolean
Whether this column is (part of) the primary key
boolean
Accessor for whether the column is unique.
Mutator for the defaultability of the column.
void
void
Mutator for the nullability of the column.
Mutator to make the column (part of) the primary key.
Mutator for the uniqueness of the column.
-
Field Details
-
-
-
-
primaryKey
boolean primaryKey
-
nullable
boolean nullable
-
defaultable
boolean defaultable
-
-
-
-
-
-
-
-
-
-
Method Details
-
isNested
public boolean isNested()
-
setNested
public void setNested(boolean nested)
-
getTable
Description copied from interface: Column
Accessor for the table for this column.
- Specified by:
getTable
in interface Column
- Returns:
- The table
-
getMemberColumnMapping
Description copied from interface: Column
Accessor for the mapping (and hence member) that owns this column.
- Specified by:
getMemberColumnMapping
in interface Column
- Returns:
- The associated mapping (or null if this is a surrogate column)
-
-
getName
Description copied from interface: Column
Accessor for the column name.
- Specified by:
getName
in interface Column
- Returns:
- Name of column
-
isPrimaryKey
public boolean isPrimaryKey()
Description copied from interface: Column
Whether this column is (part of) the primary key
- Specified by:
isPrimaryKey
in interface Column
- Returns:
- Whether part of the PK
-
setPrimaryKey
Description copied from interface: Column
Mutator to make the column (part of) the primary key.
- Specified by:
setPrimaryKey
in interface Column
- Returns:
- This column
-
setNullable
public Column setNullable(boolean flag)
Description copied from interface: Column
Mutator for the nullability of the column.
- Specified by:
setNullable
in interface Column
- Parameters:
flag
- Whether this is nullable
- Returns:
- The column with the updated info
-
isNullable
public boolean isNullable()
Description copied from interface: Column
Accessor for whether the column is nullable in the datastore.
- Specified by:
isNullable
in interface Column
- Returns:
- whether the column is nullable
-
setDefaultable
Description copied from interface: Column
Mutator for the defaultability of the column.
- Specified by:
setDefaultable
in interface Column
- Parameters:
defaultValue
- The default to use
- Returns:
- The column with the updated info
-
isDefaultable
public boolean isDefaultable()
Description copied from interface: Column
Accessor for whether the column is defaultable.
- Specified by:
isDefaultable
in interface Column
- Returns:
- whether the column is defaultable
-
getDefaultValue
public Object getDefaultValue()
Description copied from interface: Column
Accessor for the default Value
- Specified by:
getDefaultValue
in interface Column
- Returns:
- the default value
-
setUnique
public Column setUnique(boolean flag)
Description copied from interface: Column
Mutator for the uniqueness of the column.
- Specified by:
setUnique
in interface Column
- Parameters:
flag
- The flag
- Returns:
- The column with the updated info
-
isUnique
public boolean isUnique()
Description copied from interface: Column
Accessor for whether the column is unique.
- Specified by:
isUnique
in interface Column
- Returns:
- whether the column is unique
-
getColumnType
Description copied from interface: Column
Accessor for the role that this column serves (if known).
- Specified by:
getColumnType
in interface Column
- Returns:
- Role of the column
-
-
getJdbcType
Description copied from interface: Column
Accessor for the JDBC Type used for this column.
- Specified by:
getJdbcType
in interface Column
- Returns:
- The Jdbc type
-
-
getTypeName
Description copied from interface: Column
Accessor for the native type name in the datastore for this column.
- Specified by:
getTypeName
in interface Column
- Returns:
- The column type name
-
-
getPosition
public int getPosition()
Description copied from interface: Column
Accessor for the position of this column in the table (if specified).
- Specified by:
getPosition
in interface Column
- Returns:
- The position, or -1 if not specified
-
-
-