public class OracleTableMetaDataProvider extends GenericTableMetaDataProvider
TableMetaDataProvider
.
Supports a feature for including synonyms in the metadata 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.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
defaultSchema |
private boolean |
includeSynonyms |
logger
Constructor and Description |
---|
OracleTableMetaDataProvider(java.sql.DatabaseMetaData databaseMetaData)
Constructor used to initialize with provided database metadata.
|
OracleTableMetaDataProvider(java.sql.DatabaseMetaData databaseMetaData,
boolean includeSynonyms)
Constructor used to initialize with provided database metadata.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getDefaultSchema()
Provide access to default schema for subclasses.
|
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.
|
private void |
lookupDefaultSchema(java.sql.DatabaseMetaData databaseMetaData) |
catalogNameToUse, getDatabaseVersion, getNativeJdbcExtractor, getSimpleQueryForGetGeneratedKey, getTableParameterMetaData, initializeWithMetaData, isGeneratedKeysColumnNameArraySupported, isGetGeneratedKeysSimulated, isGetGeneratedKeysSupported, isStoresLowerCaseIdentifiers, isStoresUpperCaseIdentifiers, isTableColumnMetaDataUsed, metaDataCatalogNameToUse, metaDataSchemaNameToUse, schemaNameToUse, setGeneratedKeysColumnNameArraySupported, setGetGeneratedKeysSupported, setNativeJdbcExtractor, setStoresLowerCaseIdentifiers, setStoresUpperCaseIdentifiers, tableNameToUse
private final boolean includeSynonyms
private java.lang.String defaultSchema
public OracleTableMetaDataProvider(java.sql.DatabaseMetaData databaseMetaData) throws java.sql.SQLException
databaseMetaData
- metadata to be usedjava.sql.SQLException
public OracleTableMetaDataProvider(java.sql.DatabaseMetaData databaseMetaData, boolean includeSynonyms) throws java.sql.SQLException
databaseMetaData
- metadata to be usedincludeSynonyms
- whether to include synonymsjava.sql.SQLException
private void lookupDefaultSchema(java.sql.DatabaseMetaData databaseMetaData)
protected java.lang.String getDefaultSchema()
GenericTableMetaDataProvider
getDefaultSchema
in class GenericTableMetaDataProvider
public void initializeWithTableColumnMetaData(java.sql.DatabaseMetaData databaseMetaData, java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName) throws java.sql.SQLException
TableMetaDataProvider
initializeWithTableColumnMetaData
in interface TableMetaDataProvider
initializeWithTableColumnMetaData
in class GenericTableMetaDataProvider
databaseMetaData
- used to retrieve database specific informationcatalogName
- name of catalog to use (or null
if none)schemaName
- name of schema name to use (or null
if none)tableName
- name of the tablejava.sql.SQLException
- in case of initialization failure