TableMetaDataProvider interface
which should provide enough features for all supported databases.
| Modifier and Type | Class and Description |
|---|---|
| private static record | GenericTableMetaDataProvider.
Record representing table meta-data. |
| Modifier and Type | Field and Description |
|---|---|
| private String | databaseVersion
The version of the database. |
| private boolean | generatedKeysColumnNameArraySupported
Indicates whether the use of a String[] for generated keys is supported. |
| private boolean | getGeneratedKeysSupported
Indicates whether generated keys retrieval is supported. |
| private String | identifierQuoteString
The string used to quote SQL identifiers. |
| protected static final Log | logger
Logger available to subclasses. |
| private static final List | productsNotSupportingGeneratedKeysColumnNameArray
Database products we know not supporting the use of a String[] for generated keys. |
| private boolean | storesLowerCaseIdentifiers
Indicates whether the identifiers are lowercased. |
| private boolean | storesUpperCaseIdentifiers
Indicates whether the identifiers are uppercased. |
| private boolean | tableColumnMetaDataUsed
Indicates whether column meta-data has been used. |
| private final List | tableParameterMetaData
Collection of TableParameterMetaData objects. |
| private final String | userName
The name of the user currently connected. |
| Access | Constructor and Description |
|---|---|
| protected | GenericTableMetaDataProvider(DatabaseMetaData
meta-data to be used databaseMetaData)Constructor used to initialize with provided database meta-data. |
| Modifier and Type | Method and Description |
|---|---|
| public String | catalogNameToUse(String catalogName)
Implements org. Get the catalog name formatted based on meta-data information. |
| public String | columnNameToUse(String columnName)
Implements org. Get the column name formatted based on meta-data information. |
| private GenericTableMetaDataProvider. | findTableMetaData(String schemaName, String tableName, Map<String, GenericTableMetaDataProvider.
|
| protected String | |
| protected String | |
| public String | getIdentifierQuoteString()
Implements org. Get the string used to quote SQL identifiers. |
| public String | getSimpleQueryForGetGeneratedKey(String tableName, String keyColumnName)
Implements org. Get the simple query to retrieve generated keys when the JDBC feature for retrieving generated keys is not supported. |
| public List | getTableParameterMetaData()
Implements org. Get the table parameter meta-data that is currently used. |
| private String | |
| public void | initializeWithMetaData(DatabaseMetaData
used to retrieve database specific information databaseMetaData)Implements org. Initialize using the database meta-data provided. |
| public void | initializeWithTableColumnMetaData(DatabaseMetaData
used to retrieve database specific information databaseMetaData, String name of catalog to use (or catalogName, String null if none)name of schema name to use (or schemaName, String null if none)name of the table tableName)Implements org. Initialize using provided database meta-data, table and column information. |
| public boolean | isGeneratedKeysColumnNameArraySupported()
Implements org. Does this database support a column name String array for retrieving generated keys? |
| public boolean | isGetGeneratedKeysSimulated()
Implements org. Does this database support a simple query to retrieve generated keys when the JDBC feature for retrieving generated keys is not supported? |
| public boolean | isGetGeneratedKeysSupported()
Implements org. Does this database support the JDBC feature for retrieving generated keys? |
| public boolean | |
| public boolean | |
| public boolean | isTableColumnMetaDataUsed()
Implements org. Are we using the meta-data for the table columns? |
| private void | locateTableAndProcessMetaData(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String tableName)
Method supporting the meta-data processing for a table. |
| public String | metaDataCatalogNameToUse(String catalogName)
Implements org. Provide any modification of the catalog name passed in to match the meta-data currently used. |
| public String | metaDataSchemaNameToUse(String schemaName)
Implements org. Provide any modification of the schema name passed in to match the meta-data currently used. |
| private void | processTableColumns(DatabaseMetaData databaseMetaData, GenericTableMetaDataProvider.
Method supporting the meta-data processing for a table's columns. |
| public String | schemaNameToUse(String schemaName)
Implements org. Get the schema name formatted based on meta-data information. |
| public void | |
| public void | |
| public void | |
| public void | |
| public String | tableNameToUse(String tableName)
Implements org. Get the table name formatted based on meta-data information. |
| databaseVersion | back to summary |
|---|---|
| private String databaseVersion The version of the database. | |
| generatedKeysColumnNameArraySupported | back to summary |
|---|---|
| private boolean generatedKeysColumnNameArraySupported Indicates whether the use of a String[] for generated keys is supported. | |
| getGeneratedKeysSupported | back to summary |
|---|---|
| private boolean getGeneratedKeysSupported Indicates whether generated keys retrieval is supported. | |
| identifierQuoteString | back to summary |
|---|---|
| private String identifierQuoteString The string used to quote SQL identifiers. | |
| logger | back to summary |
|---|---|
| protected static final Log logger Logger available to subclasses. | |
| productsNotSupportingGeneratedKeysColumnNameArray | back to summary |
|---|---|
| private static final List<String> productsNotSupportingGeneratedKeysColumnNameArray Database products we know not supporting the use of a String[] for generated keys. | |
| storesLowerCaseIdentifiers | back to summary |
|---|---|
| private boolean storesLowerCaseIdentifiers Indicates whether the identifiers are lowercased. | |
| storesUpperCaseIdentifiers | back to summary |
|---|---|
| private boolean storesUpperCaseIdentifiers Indicates whether the identifiers are uppercased. | |
| tableColumnMetaDataUsed | back to summary |
|---|---|
| private boolean tableColumnMetaDataUsed Indicates whether column meta-data has been used. | |
| tableParameterMetaData | back to summary |
|---|---|
| private final List<TableParameterMetaData> tableParameterMetaData Collection of TableParameterMetaData objects. | |
| userName | back to summary |
|---|---|
| private final String userName The name of the user currently connected. | |
| GenericTableMetaDataProvider | back to summary |
|---|---|
| protected GenericTableMetaDataProvider(DatabaseMetaData databaseMetaData) throws SQLException Constructor used to initialize with provided database meta-data.
| |
| catalogNameToUse | back to summary |
|---|---|
| public String catalogNameToUse(String catalogName) Implements org. Doc from org. Get the catalog name formatted based on meta-data information. This could include altering the case. | |
| columnNameToUse | back to summary |
|---|---|
| public String columnNameToUse(String columnName) Implements org. Doc from org. Get the column name formatted based on meta-data information. This could include altering the case. | |
| findTableMetaData | back to summary |
|---|---|
| private GenericTableMetaDataProvider. | |
| getDatabaseVersion | back to summary |
|---|---|
| protected String getDatabaseVersion() Provide access to the version info for subclasses.
| |
| getDefaultSchema | back to summary |
|---|---|
| protected String getDefaultSchema() Provide access to the default schema for subclasses.
| |
| getIdentifierQuoteString | back to summary |
|---|---|
| public String getIdentifierQuoteString() Implements org. Doc from org. Get the string used to quote SQL identifiers. This method returns a space ( | |
| getSimpleQueryForGetGeneratedKey | back to summary |
|---|---|
| public String getSimpleQueryForGetGeneratedKey(String tableName, String keyColumnName) Implements org. Doc from org. Get the simple query to retrieve generated keys when the JDBC feature for retrieving generated keys is not supported. | |
| getTableParameterMetaData | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the table parameter meta-data that is currently used.
| |
| identifierNameToUse | back to summary |
|---|---|
private String identifierNameToUse(String identifierName)
| |
| initializeWithMetaData | back to summary |
|---|---|
| public void initializeWithMetaData(DatabaseMetaData databaseMetaData) throws SQLException Implements org. Doc from org. Initialize using the database meta-data provided.
| |
| initializeWithTableColumnMetaData | back to summary |
|---|---|
| public void initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String tableName) throws SQLException Implements org. Doc from org. Initialize using provided database meta-data, table and column information. This initialization can be turned off by specifying that column meta-data should not be used.
| |
| isGeneratedKeysColumnNameArraySupported | back to summary |
|---|---|
| public boolean isGeneratedKeysColumnNameArraySupported() Implements org. Doc from org. Does this database support a column name String array for retrieving generated keys?
| |
| isGetGeneratedKeysSimulated | back to summary |
|---|---|
| public boolean isGetGeneratedKeysSimulated() Implements org. Doc from org. Does this database support a simple query to retrieve generated keys when the JDBC feature for retrieving generated keys is not supported?
| |
| isGetGeneratedKeysSupported | back to summary |
|---|---|
| public boolean isGetGeneratedKeysSupported() Implements org. Doc from org. Does this database support the JDBC feature for retrieving generated keys?
| |
| isStoresLowerCaseIdentifiers | back to summary |
|---|---|
| public boolean isStoresLowerCaseIdentifiers() | |
| isStoresUpperCaseIdentifiers | back to summary |
|---|---|
| public boolean isStoresUpperCaseIdentifiers() | |
| isTableColumnMetaDataUsed | back to summary |
|---|---|
| public boolean isTableColumnMetaDataUsed() Implements org. Doc from org. Are we using the meta-data for the table columns?
| |
| locateTableAndProcessMetaData | back to summary |
|---|---|
| private void locateTableAndProcessMetaData(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String tableName) Method supporting the meta-data processing for a table. | |
| metaDataCatalogNameToUse | back to summary |
|---|---|
| public String metaDataCatalogNameToUse(String catalogName) Implements org. Doc from org. Provide any modification of the catalog name passed in to match the meta-data currently used. The returned value will be used for meta-data lookups. This could include altering the case used or providing a base catalog if none is provided. | |
| metaDataSchemaNameToUse | back to summary |
|---|---|
| public String metaDataSchemaNameToUse(String schemaName) Implements org. Doc from org. Provide any modification of the schema name passed in to match the meta-data currently used. The returned value will be used for meta-data lookups. This could include altering the case used or providing a base schema if none is provided. | |
| processTableColumns | back to summary |
|---|---|
| private void processTableColumns(DatabaseMetaData databaseMetaData, GenericTableMetaDataProvider. Method supporting the meta-data processing for a table's columns. | |
| schemaNameToUse | back to summary |
|---|---|
| public String schemaNameToUse(String schemaName) Implements org. Doc from org. Get the schema name formatted based on meta-data information. This could include altering the case. | |
| setGeneratedKeysColumnNameArraySupported | back to summary |
|---|---|
| public void setGeneratedKeysColumnNameArraySupported(boolean generatedKeysColumnNameArraySupported) | |
| setGetGeneratedKeysSupported | back to summary |
|---|---|
| public void setGetGeneratedKeysSupported(boolean getGeneratedKeysSupported) | |
| setStoresLowerCaseIdentifiers | back to summary |
|---|---|
| public void setStoresLowerCaseIdentifiers(boolean storesLowerCaseIdentifiers) | |
| setStoresUpperCaseIdentifiers | back to summary |
|---|---|
| public void setStoresUpperCaseIdentifiers(boolean storesUpperCaseIdentifiers) | |
| tableNameToUse | back to summary |
|---|---|
| public String tableNameToUse(String tableName) Implements org. Doc from org. Get the table name formatted based on meta-data information. This could include altering the case. | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | catalogName
Record Component accessed by catalogName(). |
| private final String | schemaName
Record Component accessed by schemaName(). |
| private final String | tableName
Record Component accessed by tableName(). |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public final boolean | equals(Object
the reference object with which to compare. o)Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public String | |
| public String | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| catalogName | back to summary |
|---|---|
| private final String catalogName Record Component accessed by catalogName(). | |
| schemaName | back to summary |
|---|---|
| private final String schemaName Record Component accessed by schemaName(). | |
| tableName | back to summary |
|---|---|
| private final String tableName Record Component accessed by tableName(). | |
| TableMetaData | back to summary |
|---|---|
| private TableMetaData(String catalogName, String schemaName, String tableName) | |
| catalogName | back to summary |
|---|---|
| public String catalogName() Record Component getter of catalogName.
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| schemaName | back to summary |
|---|---|
| public String schemaName() Record Component getter of schemaName.
| |
| tableName | back to summary |
|---|---|
| public String tableName() Record Component getter of tableName.
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |