public class InformationExtractorJdbcDatabaseMetaDataImpl extends java.lang.Object implements InformationExtractor
DatabaseMetaData
API for extraction.Modifier and Type | Class and Description |
---|---|
protected static interface |
InformationExtractorJdbcDatabaseMetaDataImpl.ForeignKeyBuilder |
protected static class |
InformationExtractorJdbcDatabaseMetaDataImpl.ForeignKeyBuilderImpl |
Constructor and Description |
---|
InformationExtractorJdbcDatabaseMetaDataImpl(ExtractionContext extractionContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
catalogExists(Identifier catalog)
Does the given catalog exist yet?
|
protected JDBCException |
convertSQLException(java.sql.SQLException sqlException,
java.lang.String message) |
java.lang.Iterable<ForeignKeyInformation> |
getForeignKeys(TableInformation tableInformation)
Extract information about foreign keys defined on the given table (targeting or point-at other tables).
|
java.lang.Iterable<IndexInformation> |
getIndexes(TableInformation tableInformation)
Extract information about indexes defined against the given table.
|
PrimaryKeyInformation |
getPrimaryKey(TableInformationImpl tableInformation)
Extract information about the given table's primary key.
|
TableInformation |
getTable(Identifier catalog,
Identifier schema,
Identifier tableName)
Look for a matching table.
|
NameSpaceTablesInformation |
getTables(Identifier catalog,
Identifier schema)
Extract all the tables information.
|
protected IdentifierHelper |
identifierHelper() |
protected boolean |
isPhysicalTableType(java.lang.String tableType) |
boolean |
schemaExists(Identifier catalog,
Identifier schema)
The the given schema exist yet?
|
protected java.lang.String |
toMetaDataObjectName(Identifier identifier) |
public InformationExtractorJdbcDatabaseMetaDataImpl(ExtractionContext extractionContext)
protected IdentifierHelper identifierHelper()
protected JDBCException convertSQLException(java.sql.SQLException sqlException, java.lang.String message)
protected java.lang.String toMetaDataObjectName(Identifier identifier)
public boolean catalogExists(Identifier catalog)
InformationExtractor
catalogExists
in interface InformationExtractor
catalog
- The name of the catalog to look for.true
if the catalog does exist; false
otherwisepublic boolean schemaExists(Identifier catalog, Identifier schema)
InformationExtractor
schemaExists
in interface InformationExtractor
catalog
- The name of the catalog to look in.schema
- The name of the schema to look for.true
if the schema does exist; false
otherwisepublic TableInformation getTable(Identifier catalog, Identifier schema, Identifier tableName)
InformationExtractor
getTable
in interface InformationExtractor
catalog
- Can be null
, indicating that any catalog may be considered a match. A
non-null
value indicates that search should be limited to the passed catalog.schema
- Can be null
, indicating that any schema may be considered a match. A
non-null
value indicates that search should be limited to the passed schema .tableName
- The name of the table to look for.public NameSpaceTablesInformation getTables(Identifier catalog, Identifier schema)
InformationExtractor
getTables
in interface InformationExtractor
catalog
- Can be null
, indicating that any catalog may be considered a match. A
non-null
value indicates that search should be limited to the passed catalog.schema
- Can be null
, indicating that any schema may be considered a match. A
non-null
value indicates that search should be limited to the passed schema .NameSpaceTablesInformation
protected boolean isPhysicalTableType(java.lang.String tableType)
public PrimaryKeyInformation getPrimaryKey(TableInformationImpl tableInformation)
InformationExtractor
getPrimaryKey
in interface InformationExtractor
tableInformation
- The table for which to locate primary key information,public java.lang.Iterable<IndexInformation> getIndexes(TableInformation tableInformation)
InformationExtractor
getIndexes
in interface InformationExtractor
tableInformation
- The table for which to locate indexespublic java.lang.Iterable<ForeignKeyInformation> getForeignKeys(TableInformation tableInformation)
InformationExtractor
getForeignKeys
in interface InformationExtractor
tableInformation
- The table for which to locate foreign-keysCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.