Interface Column
- All Known Implementing Classes:
ColumnImpl
public interface Column
Interface representing a column in a table.
-
Method Summary
Modifier and TypeMethodDescriptionAccessor for the metadata for this column (if any).Accessor for the role that this column serves (if known).Accessor for the default ValueAccessor for the JDBC Type used for this column.Accessor for the mapping (and hence member) that owns this column.getName()Accessor for the column name.intAccessor for the position of this column in the table (if specified).getTable()Accessor for the table for this column.Accessor for the native type name in the datastore for this column.booleanAccessor for whether the column is defaultable.booleanAccessor for whether the column is nullable in the datastore.booleanWhether this column is (part of) the primary keybooleanisUnique()Accessor for whether the column is unique.setDefaultable(Object defaultValue) Mutator for the defaultability of the column.setJdbcType(JdbcType jdbcType) setNullable(boolean nullable) Mutator for the nullability of the column.setPosition(int pos) Mutator to make the column (part of) the primary key.setTypeName(String type) setUnique(boolean unique) Mutator for the uniqueness of the column.
-
Method Details
-
getName
-
getTable
-
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
-
setNullable
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
-
isDefaultable
boolean isDefaultable()Accessor for whether the column is defaultable.- Returns:
- whether the column is defaultable
-
getDefaultValue
-
setUnique
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
-
setJdbcType
-
getJdbcType
-
setTypeName
-
getTypeName
String getTypeName()Accessor for the native type name in the datastore for this column.- Returns:
- The column type name
-
setPosition
-
getPosition
int getPosition()Accessor for the position of this column in the table (if specified).- Returns:
- The position, or -1 if not specified
-
setColumnMetaData
-
getColumnMetaData
ColumnMetaData getColumnMetaData()Accessor for the metadata for this column (if any).- Returns:
- Metadata for the column
-