@ -24,9 +24,11 @@ import org.springframework.lang.Nullable;
@@ -24,9 +24,11 @@ import org.springframework.lang.Nullable;
/ * *
* Interface specifying the API to be implemented by a class providing table meta - data .
* This is intended for internal use by the Simple JDBC classes .
*
* < p > This is intended for internal use by the Simple JDBC classes .
*
* @author Thomas Risberg
* @author Sam Brannen
* @since 2 . 5
* /
public interface TableMetaDataProvider {
@ -40,7 +42,8 @@ public interface TableMetaDataProvider {
@@ -40,7 +42,8 @@ public interface TableMetaDataProvider {
/ * *
* 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 .
* < p > This initialization can be turned off by specifying that column meta - data
* should not be used .
* @param databaseMetaData used to retrieve database specific information
* @param catalogName name of catalog to use ( or { @code null } if none )
* @param schemaName name of schema name to use ( or { @code null } if none )
@ -52,37 +55,41 @@ public interface TableMetaDataProvider {
@@ -52,37 +55,41 @@ public interface TableMetaDataProvider {
/ * *
* Get the table name formatted based on meta - data information .
* This could include altering the case .
* < p > This could include altering the case .
* /
@Nullable
String tableNameToUse ( @Nullable String tableName ) ;
/ * *
* Get the catalog name formatted based on meta - data information .
* This could include altering the case .
* < p > This could include altering the case .
* /
@Nullable
String catalogNameToUse ( @Nullable String catalogName ) ;
/ * *
* Get the schema name formatted based on meta - data information .
* This could include altering the case .
* < p > This could include altering the case .
* /
@Nullable
String schemaNameToUse ( @Nullable String schemaName ) ;
/ * *
* 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 .
* Provide any modification of the catalog name passed in to match the meta - data
* currently used .
* < p > The returned value will be used for meta - data lookups .
* < p > This could include altering the case used or providing a base catalog
* if none is provided .
* /
@Nullable
String metaDataCatalogNameToUse ( @Nullable String catalogName ) ;
/ * *
* 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 .
* Provide any modification of the schema name passed in to match the meta - data
* currently used .
* < p > The returned value will be used for meta - data lookups .
* < p > This could include altering the case used or providing a base schema
* if none is provided .
* /
@Nullable
String metaDataSchemaNameToUse ( @Nullable String schemaName ) ;
@ -93,8 +100,8 @@ public interface TableMetaDataProvider {
@@ -93,8 +100,8 @@ public interface TableMetaDataProvider {
boolean isTableColumnMetaDataUsed ( ) ;
/ * *
* Does this database support the JDBC 3 . 0 feature of retrieving generated keys :
* { @link java . sql . DatabaseMetaData # supportsGetGeneratedKeys ( ) } ?
* Does this database support the JDBC 3 . 0 feature of retrieving generated keys ?
* @see java . sql . DatabaseMetaData # supportsGetGeneratedKeys ( )
* /
boolean isGetGeneratedKeysSupported ( ) ;
@ -112,8 +119,9 @@ public interface TableMetaDataProvider {
@@ -112,8 +119,9 @@ public interface TableMetaDataProvider {
String getSimpleQueryForGetGeneratedKey ( String tableName , String keyColumnName ) ;
/ * *
* Does this database support a column name String array for retrieving generated keys :
* { @link java . sql . Connection # createStruct ( String , Object [ ] ) } ?
* Does this database support a column name String array for retrieving generated
* keys ?
* @see java . sql . Connection # createStruct ( String , Object [ ] )
* /
boolean isGeneratedKeysColumnNameArraySupported ( ) ;