Package org.springframework.jdbc.core.metadata

# Class OracleTableMetaDataProvider

java.lang.Object
org.springframework.jdbc.core.metadata.GenericTableMetaDataProvider
org.springframework.jdbc.core.metadata.OracleTableMetaDataProvider

All Implemented Interfaces:
  `TableMetaDataProvider`

public class OracleTableMetaDataProvider extends GenericTableMetaDataProvider
Oracle-specific implementation of the `TableMetaDataProvider`. Supports a feature for including synonyms in the meta-data lookup. Also supports lookup of current schema using the `sys_context`.

Thanks to Mike Youngstrom and Bruce Campbell for submitting the original suggestion for the Oracle current schema lookup implementation.

Since:
  3.0
Author:
  Thomas Risberg, Juergen Hoeller

## Field Summary

### Fields inherited from class org.springframework.jdbc.core.metadata.GenericTableMetaDataProvider

`logger`

## Constructor Summary

Constructors
Constructor
Description
`OracleTableMetaDataProvider(DatabaseMetaData databaseMetaData)`
Constructor used to initialize with provided database meta-data.
`OracleTableMetaDataProvider(DatabaseMetaData databaseMetaData, boolean includeSynonyms)`
Constructor used to initialize with provided database meta-data.

## Method Summary

Modifier and Type
Method
Description
`protected String`
`getDefaultSchema()`
Provide access to the default schema for subclasses.
`void`
`initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String tableName)`
Initialize using provided database meta-data, table and column information.

### Methods inherited from class org.springframework.jdbc.core.metadata.GenericTableMetaDataProvider

`catalogNameToUse, columnNameToUse, getDatabaseVersion, getIdentifierQuoteString, getSimpleQueryForGetGeneratedKey, getTableParameterMetaData, initializeWithMetaData, isGeneratedKeysColumnNameArraySupported, isGetGeneratedKeysSimulated, isGetGeneratedKeysSupported, isStoresLowerCaseIdentifiers, isStoresUpperCaseIdentifiers, isTableColumnMetaDataUsed, metaDataCatalogNameToUse, metaDataSchemaNameToUse, schemaNameToUse, setGeneratedKeysColumnNameArraySupported, setGetGeneratedKeysSupported, setStoresLowerCaseIdentifiers, setStoresUpperCaseIdentifiers, tableNameToUse`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### OracleTableMetaDataProvider

public OracleTableMetaDataProvider(DatabaseMetaData databaseMetaData) throws SQLException
Constructor used to initialize with provided database meta-data.

Parameters:
  `databaseMetaData` - meta-data to be used
Throws:
  `SQLException`

### OracleTableMetaDataProvider

public OracleTableMetaDataProvider(DatabaseMetaData databaseMetaData, boolean includeSynonyms) throws SQLException
Constructor used to initialize with provided database meta-data.

Parameters:
  `databaseMetaData` - meta-data to be used
  `includeSynonyms` - whether to include synonyms
Throws:
  `SQLException`

## Method Details

### getDefaultSchema

@Nullable protected String getDefaultSchema()
Description copied from class: `GenericTableMetaDataProvider`
Provide access to the default schema for subclasses.

Overrides:
  `getDefaultSchema` in class `GenericTableMetaDataProvider`

### initializeWithTableColumnMetaData

public void initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData, @Nullable String catalogName, @Nullable String schemaName, @Nullable String tableName) throws SQLException
Description copied from 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.

Specified by:
  `initializeWithTableColumnMetaData` in interface `TableMetaDataProvider`
Overrides:
  `initializeWithTableColumnMetaData` in class `GenericTableMetaDataProvider`
Parameters:
  `databaseMetaData` - used to retrieve database specific information
  `catalogName` - name of catalog to use (or `null` if none)
  `schemaName` - name of schema name to use (or `null` if none)
  `tableName` - name of the table
Throws:
  `SQLException` - in case of initialization failure