public interface Column
Represents metadata about a single column in a database table, as derived from the entity or projection model.
A Column provides information about the column's name, type, nullability, and role (primary key,
foreign key, version column, etc.). Columns are obtained from a Model via Model.columns() or
Model.declaredColumns() .
The index() method returns the 1-based index of the column within the expanded column list of the
model, which includes columns from foreign key relationships.
See Also:
Method Summary
All Methods Instance Methods Abstract Methods
boolean
Determines if the column is a foreign key.
Gets the generation strategy for the primary key.
int
Gets the 1-based index of the column.
boolean
Determines if the column is insertable.
Gets the metamodel of the column.
Gets the name of the column.
boolean
Determines if the column is nullable.
boolean
Determines if the column is a primary key.
boolean
Determines if the column is a ref column.
Gets the sequence name for generating the primary key, or empty if the primary key is not generated by a
sequence.
Gets the type of the column.
boolean
Determines if the column is updatable.
boolean
Determines if the column is used for versioning.
Method Details
index
int index ()
Gets the 1-based index of the column.
Returns:
the column index.
name
Gets the name of the column.
Returns:
the column name.
type
Gets the type of the column.
Returns:
the type of the column.
primaryKey
boolean primaryKey ()
Determines if the column is a primary key.
Returns:
true if it is a primary key, false otherwise.
generation
Gets the generation strategy for the primary key.
Returns:
the generation strategy for the primary key.
sequence
Gets the sequence name for generating the primary key, or empty if the primary key is not generated by a
sequence.
Returns:
the sequence name for generating the primary key.
foreignKey
boolean foreignKey ()
Determines if the column is a foreign key.
Returns:
true if it is a foreign key, false otherwise.
nullable
boolean nullable ()
Determines if the column is nullable.
Returns:
true if the column can be null, false otherwise.
insertable
boolean insertable ()
Determines if the column is insertable.
Returns:
true if the column can be inserted, false otherwise.
updatable
boolean updatable ()
Determines if the column is updatable.
Returns:
true if the column can be updated, false otherwise.
version
boolean version ()
Determines if the column is used for versioning.
Returns:
true if it is a version column, false otherwise.
ref
boolean ref ()
Determines if the column is a ref column.
Returns:
if the column is a ref column, false otherwise.