primaryKey
Retrieve the primary key columns' metadata for the table.
- Returns:
- a list of
ColumnMetaDataobjects representing the metadata of the primary key columns in the table.
It extends the Table class and provides additional information about the table's columns,
primary key, and column mappings.
This class is immutable and thread-safe.
TableMetaData(String catalog,
String schema,
String table,
List<String> primaryKey,
List<ColumnMetaData> columns) TableMetaData object representing metadata for a database table.TableMetaData(Table table,
List<String> primaryKey,
List<ColumnMetaData> columns) TableMetaData instance using the provided table, primary key, and column metadata.catalog()columns()booleanbooleaninthashCode()name()schema()toString()toTable()TableMetaData instance using the provided table, primary key, and column metadata.table - the Table object representing the database table; must not be nullprimaryKey - a list of column names representing the primary key of the table; must not be nullcolumns - a list of ColumnMetaData objects representing the columns of the table; must not be nullIllegalArgumentException - if any primary key column metadata is not found in the provided column metadataTableMetaData object representing metadata for a database table.catalog - the catalog name of the table; may be null if not applicableschema - the schema name of the table; may be null if not applicabletable - the name of the table; must not be nullprimaryKey - a list of column names representing the primary key of the table; must not be nullcolumns - a list of ColumnMetaData objects representing the columns of the table; must not be nullIllegalArgumentException - if any primary key column metadata is not found in the provided column metadataColumnMetaData objects representing the metadata
of the primary key columns in the table.ColumnMetaData objects representing the metadata
of all columns in the table.
If the column does not exist, an IllegalArgumentException is thrown.
columnName - the name of the column whose metadata is to be retrievedColumnMetaData object associated with the specified column nameIllegalArgumentException - if the column is not found or if the provided name is nullcolumnName - the name of the column to check for existence