-
- All Known Implementing Classes:
ColumnImpl
public interface Column
Interface representing a column in a table.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ColumnMetaData
getColumnMetaData()
Accessor for the metadata for this column (if any).ColumnType
getColumnType()
Accessor for the role that this column serves (if known).Object
getDefaultValue()
Accessor for the default ValueJdbcType
getJdbcType()
Accessor for the JDBC Type used for this column.MemberColumnMapping
getMemberColumnMapping()
Accessor for the mapping (and hence member) that owns this column.String
getName()
Accessor for the column name.int
getPosition()
Accessor for the position of this column in the table (if specified).Table
getTable()
Accessor for the table for this column.String
getTypeName()
Accessor for the native type name in the datastore for this column.boolean
isDefaultable()
Accessor for whether the column is defaultable.boolean
isNullable()
Accessor for whether the column is nullable in the datastore.boolean
isPrimaryKey()
Whether this column is (part of) the primary keyboolean
isUnique()
Accessor for whether the column is unique.Column
setColumnMetaData(ColumnMetaData md)
Column
setDefaultable(Object defaultValue)
Mutator for the defaultability of the column.Column
setJdbcType(JdbcType jdbcType)
Column
setNullable(boolean nullable)
Mutator for the nullability of the column.Column
setPosition(int pos)
Column
setPrimaryKey()
Mutator to make the column (part of) the primary key.Column
setTypeName(String type)
Column
setUnique(boolean unique)
Mutator for the uniqueness of the column.
-
-
-
Method Detail
-
getName
String getName()
Accessor for the column name.- Returns:
- Name of column
-
getTable
Table getTable()
Accessor for the table for this column.- Returns:
- The table
-
getMemberColumnMapping
MemberColumnMapping getMemberColumnMapping()
Accessor for the mapping (and hence member) that owns this column.- Returns:
- The associated mapping (or null if this is a surrogate column)
-
isPrimaryKey
boolean isPrimaryKey()
Whether this column is (part of) the primary key- Returns:
- Whether part of the PK
-
setPrimaryKey
Column setPrimaryKey()
Mutator to make the column (part of) the primary key.- Returns:
- This column
-
setNullable
Column setNullable(boolean nullable)
Mutator for the nullability of the column.- Parameters:
nullable
- Whether this is nullable- Returns:
- The column with the updated info
-
isNullable
boolean isNullable()
Accessor for whether the column is nullable in the datastore.- Returns:
- whether the column is nullable
-
setDefaultable
Column setDefaultable(Object defaultValue)
Mutator for the defaultability of the column.- Parameters:
defaultValue
- The default to use- Returns:
- The column with the updated info
-
isDefaultable
boolean isDefaultable()
Accessor for whether the column is defaultable.- Returns:
- whether the column is defaultable
-
getDefaultValue
Object getDefaultValue()
Accessor for the default Value- Returns:
- the default value
-
setUnique
Column setUnique(boolean unique)
Mutator for the uniqueness of the column.- Parameters:
unique
- The flag- Returns:
- The column with the updated info
-
isUnique
boolean isUnique()
Accessor for whether the column is unique.- Returns:
- whether the column is unique
-
getColumnType
ColumnType getColumnType()
Accessor for the role that this column serves (if known).- Returns:
- Role of the column
-
getJdbcType
JdbcType getJdbcType()
Accessor for the JDBC Type used for this column.- Returns:
- The Jdbc type
-
getTypeName
String getTypeName()
Accessor for the native type name in the datastore for this column.- Returns:
- The column type name
-
setPosition
Column setPosition(int pos)
-
getPosition
int getPosition()
Accessor for the position of this column in the table (if specified).- Returns:
- The position, or -1 if not specified
-
setColumnMetaData
Column setColumnMetaData(ColumnMetaData md)
-
getColumnMetaData
ColumnMetaData getColumnMetaData()
Accessor for the metadata for this column (if any).- Returns:
- Metadata for the column
-
-