@Immutable public interface Table
| Modifier and Type | Method and Description |
|---|---|
List<Column> |
columns()
Get the definitions for the columns in this table, in the same order in which the table defines them.
|
Column |
columnWithName(String name)
Get the definition for the column in this table with the supplied name.
|
String |
defaultCharsetName()
Get the database-specific name of the default character set used by columns in this table.
|
TableEditor |
edit()
Obtain an editor that contains the same information as this table definition.
|
static TableEditor |
editor()
Obtain an table definition editor that can be used to define a table.
|
default List<Column> |
filterColumns(Predicate<Column> predicate)
Utility to obtain a copy of a list of the columns that satisfy the specified predicate.
|
TableId |
id()
Get the identifier for this table.
|
default boolean |
isAutoIncremented(String columnName)
Determine if the named column is auto-incremented.
|
default boolean |
isGenerated(String columnName)
Determine if the values in the named column is generated by the database.
|
default boolean |
isOptional(String columnName)
Determine if the values in the named column is optional.
|
default boolean |
isPrimaryKeyColumn(String columnName)
Determine if the named column is part of the primary key.
|
List<String> |
primaryKeyColumnNames()
The list of column names that make up the primary key for this table.
|
default List<Column> |
primaryKeyColumns()
Get the columns that make up the primary key for this table.
|
List<String> |
retrieveColumnNames()
The list of column names that make up this table.
|
static TableEditor editor()
TableId id()
List<String> primaryKeyColumnNames()
default List<Column> primaryKeyColumns()
default List<Column> filterColumns(Predicate<Column> predicate)
predicate - the filter predicate; may not be nullList<String> retrieveColumnNames()
Note: If feasible, call columns() instead, e.g. if just interested in the number of columns.
List<Column> columns()
Column columnWithName(String name)
name - the case-insensitive name of the columnString defaultCharsetName()
null if there is no
such default character set name defined on the tabledefault boolean isPrimaryKeyColumn(String columnName)
columnName - the name of the columntrue if a column exists in this table and it is part of the primary key, or false otherwisedefault boolean isAutoIncremented(String columnName)
columnName - the name of the columntrue if a column exists in this table and it is auto-incremented, or false otherwisedefault boolean isGenerated(String columnName)
columnName - the name of the columntrue if a column exists in this table and its values are generated, or false otherwisedefault boolean isOptional(String columnName)
columnName - the name of the columntrue if a column exists in this table and is optional, or false otherwiseTableEditor edit()
Copyright © 2021 JBoss by Red Hat. All rights reserved.