Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jdbc.core.metadata
Interface TableMetaDataProvider

All Known Implementing Classes:
  DerbyTableMetaDataProvider, GenericTableMetaDataProvider, HsqlTableMetaDataProvider, OracleTableMetaDataProvider, PostgresTableMetaDataProvider

    public interface TableMetaDataProvider

Interface specifying the API to be implemented by a class providing table metedata. This is intended for internal use by the Simple JDBC classes.

Since:
  2.5
Author:
  Thomas Risberg

Method Summary
`java.lang.String` | `catalogNameToUse(java.lang.String catalogName)` Get the catalog name formatted based on metadata information.
`java.lang.String` | `getSimpleQueryForGetGeneratedKey(java.lang.String tableName, java.lang.String keyColumnName)` Get the simple query to retrieve a generated key
`java.util.List<TableParameterMetaData>` | `getTableParameterMetaData()` Get the table parameter metadata that is currently used.
`void` | `initializeWithMetaData(java.sql.DatabaseMetaData databaseMetaData)` Initialize using the database metedata provided
`void` | `initializeWithTableColumnMetaData(java.sql.DatabaseMetaData databaseMetaData, java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName)` Initialize using provided database metadata, table and column information.
`boolean` | `isGeneratedKeysColumnNameArraySupported()` Does this database support a column name String array for retreiving generated keys `Connection.createStruct(String, Object[])`
`boolean` | `isGetGeneratedKeysSimulated()` Does this database support a simple quey to retrieve the generated key whe the JDBC 3.0 feature of retreiving generated keys is not supported `DatabaseMetaData.supportsGetGeneratedKeys()`
`boolean` | `isGetGeneratedKeysSupported()` Does this database support the JDBC 3.0 feature of retreiving generated keys `DatabaseMetaData.supportsGetGeneratedKeys()`
`boolean` | `isTableColumnMetaDataUsed()` Are we using the meta data for the table columns?
`java.lang.String` | `metaDataCatalogNameToUse(java.lang.String catalogName)` Provide any modification of the catalog name passed in to match the meta data currently used.
`java.lang.String` | `metaDataSchemaNameToUse(java.lang.String schemaName)` Provide any modification of the schema name passed in to match the meta data currently used.
`java.lang.String` | `schemaNameToUse(java.lang.String schemaName)` Get the schema name formatted based on metadata information.
`void` | `setNativeJdbcExtractor(NativeJdbcExtractor nativeJdbcExtractor)` Set the `NativeJdbcExtractor` to use to retrieve the native connection if necessary
`java.lang.String` | `tableNameToUse(java.lang.String tableName)` Get the table name formatted based on metadata information.

Method Detail

### initializeWithMetaData

    void initializeWithMetaData(java.sql.DatabaseMetaData databaseMetaData)
                                throws java.sql.SQLException

  Initialize using the database metedata provided

  Parameters:
    `databaseMetaData` -
  Throws:
    `java.sql.SQLException`

### initializeWithTableColumnMetaData

    void initializeWithTableColumnMetaData(java.sql.DatabaseMetaData databaseMetaData,
                                           java.lang.String catalogName,
                                           java.lang.String schemaName,
                                           java.lang.String tableName)
                                           throws java.sql.SQLException

  Initialize using provided database metadata, table and column information. This initalization can be turned off by specifying that column meta data should not be used.

  Parameters:
    `databaseMetaData` - used to retrieve database specific information
    `catalogName` - name of catalog to use or null
    `schemaName` - name of schema name to use or null
    `tableName` - name of the table
  Throws:
    `java.sql.SQLException`

### tableNameToUse

    java.lang.String tableNameToUse(java.lang.String tableName)

  Get the table name formatted based on metadata information. This could include altering the case.

  Parameters:
    `tableName` -
  Returns:
    table name formatted

### catalogNameToUse

    java.lang.String catalogNameToUse(java.lang.String catalogName)

  Get the catalog name formatted based on metadata information. This could include altering the case.

  Parameters:
    `catalogName` -
  Returns:
    catalog name formatted

### schemaNameToUse

    java.lang.String schemaNameToUse(java.lang.String schemaName)

  Get the schema name formatted based on metadata information. This could include altering the case.

  Parameters:
    `schemaName` -
  Returns:
    schema name formatted

### metaDataCatalogNameToUse

    java.lang.String metaDataCatalogNameToUse(java.lang.String catalogName)

  Provide any modification of the catalog name passed in to match the meta data currently used. The reyurned value will be used for meta data lookups. This could include alterig the case used or providing a base catalog if mone provided.

  Parameters:
    `catalogName` -
  Returns:
    catalog name to use

### metaDataSchemaNameToUse

    java.lang.String metaDataSchemaNameToUse(java.lang.String schemaName)

  Provide any modification of the schema name passed in to match the meta data currently used. The reyurned value will be used for meta data lookups. This could include alterig the case used or providing a base schema if mone provided.

  Parameters:
    `schemaName` -
  Returns:
    schema name to use

### isTableColumnMetaDataUsed

    boolean isTableColumnMetaDataUsed()

  Are we using the meta data for the table columns?

### isGetGeneratedKeysSupported

    boolean isGetGeneratedKeysSupported()

  Does this database support the JDBC 3.0 feature of retreiving generated keys `DatabaseMetaData.supportsGetGeneratedKeys()`

### isGetGeneratedKeysSimulated

    boolean isGetGeneratedKeysSimulated()

  Does this database support a simple quey to retrieve the generated key whe the JDBC 3.0 feature of retreiving generated keys is not supported `DatabaseMetaData.supportsGetGeneratedKeys()`

### getSimpleQueryForGetGeneratedKey

    java.lang.String getSimpleQueryForGetGeneratedKey(java.lang.String tableName,
                                                      java.lang.String keyColumnName)

  Get the simple query to retrieve a generated key

### isGeneratedKeysColumnNameArraySupported

    boolean isGeneratedKeysColumnNameArraySupported()

  Does this database support a column name String array for retreiving generated keys `Connection.createStruct(String, Object[])`

### getTableParameterMetaData

    java.util.List<TableParameterMetaData> getTableParameterMetaData()

  Get the table parameter metadata that is currently used.

  Returns:
    List of `TableParameterMetaData`

### setNativeJdbcExtractor

    void setNativeJdbcExtractor(NativeJdbcExtractor nativeJdbcExtractor)

  Set the `NativeJdbcExtractor` to use to retrieve the native connection if necessary

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD