All Known Implementing Classes:
TableImpl
An immutable definition of a table.
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods
Get the attributes of the table.
Get the definition for an attribute in this table with the supplied name.
Get the definitions for the columns in this table, in the same order in which the table defines them.
Get the definition for the column in this table with the supplied name.
Get the comment of the table.
Get the database-specific name of the default character set used by columns in this table.
Obtain an editor that contains the same information as this table definition.
Obtain an table definition editor that can be used to define a table.
Utility to obtain a copy of a list of the columns that satisfy the specified predicate.
Get the identifier for this table.
default boolean
Determine if the named column is auto-incremented.
default boolean
Determine if the values in the named column is generated by the database.
default boolean
Determine if the values in the named column is optional.
default boolean
Determine if the named column is part of the primary key.
The list of column names that make up the primary key for this table.
Get the columns that make up the primary key for this table.
The list of column names that make up this table.
Method Details
editor
Obtain an table definition editor that can be used to define a table.
Returns:
the editor; never null
id
Get the identifier for this table.
Returns:
the identifier; never null
primaryKeyColumnNames
The list of column names that make up the primary key for this table.
Returns:
the immutable list of column names that make up the primary key; never null but possibly empty
primaryKeyColumns
Get the columns that make up the primary key for this table.
Returns:
the immutable list of columns that make up the primary key; never null but possibly empty
filterColumns
Utility to obtain a copy of a list of the columns that satisfy the specified predicate.
Parameters:
predicate
- the filter predicate; may not be null
Returns:
the list of columns that satisfy the predicate; never null but possibly empty
retrieveColumnNames
The list of column names that make up this table.
Note: If feasible, call columns()
instead, e.g. if just interested in the number of columns.
Returns:
the immutable list of column names ; never null but possibly empty
columns
Get the definitions for the columns in this table, in the same order in which the table defines them.
Returns:
the immutable and ordered list of definitions; never null
columnWithName
Get the definition for the column in this table with the supplied name. The case of the supplied name does not matter.
Parameters:
name
- the case-insensitive name of the column
Returns:
the column definition, or null if there is no column with the given name
defaultCharsetName
Get the database-specific name of the default character set used by columns in this table.
Returns:
the database-specific character set name used by default in columns of this table, or null
if there is no
such default character set name defined on the table
attributes
Get the attributes of the table.
Returns:
the table attributes; may be null if not set
attributeWithName
Get the definition for an attribute in this table with the supplied name.
Parameters:
name
- the case-insensitive name of the attribute
Returns:
the attribute definition, or null if there is no attribute with the given name
isPrimaryKeyColumn
default boolean isPrimaryKeyColumn (String columnName)
Determine if the named column is part of the primary key.
Parameters:
columnName
- the name of the column
Returns:
true
if a column exists in this table and it is part of the primary key, or false
otherwise
isAutoIncremented
default boolean isAutoIncremented (String columnName)
Determine if the named column is auto-incremented.
Parameters:
columnName
- the name of the column
Returns:
true
if a column exists in this table and it is auto-incremented, or false
otherwise
isGenerated
default boolean isGenerated (String columnName)
Determine if the values in the named column is generated by the database.
Parameters:
columnName
- the name of the column
Returns:
true
if a column exists in this table and its values are generated, or false
otherwise
isOptional
default boolean isOptional (String columnName)
Determine if the values in the named column is optional.
Parameters:
columnName
- the name of the column
Returns:
true
if a column exists in this table and is optional, or false
otherwise
edit
Obtain an editor that contains the same information as this table definition.
Returns:
the editor; never null