public class InformationExtractorJdbcDatabaseMetaDataImpl extends 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(SQLException sqlException,
String message) |
Iterable<ForeignKeyInformation> |
getForeignKeys(TableInformation tableInformation)
Extract information about foreign keys defined on the given table (targeting or point-at other tables).
|
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(String tableType) |
boolean |
schemaExists(Identifier catalog,
Identifier schema)
The the given schema exist yet?
|
protected String |
toMetaDataObjectName(Identifier identifier) |
public InformationExtractorJdbcDatabaseMetaDataImpl(ExtractionContext extractionContext)
protected IdentifierHelper identifierHelper()
protected JDBCException convertSQLException(SQLException sqlException, String message)
protected 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(String tableType)
public PrimaryKeyInformation getPrimaryKey(TableInformationImpl tableInformation)
InformationExtractor
getPrimaryKey
in interface InformationExtractor
tableInformation
- The table for which to locate primary key information,public Iterable<IndexInformation> getIndexes(TableInformation tableInformation)
InformationExtractor
getIndexes
in interface InformationExtractor
tableInformation
- The table for which to locate indexespublic Iterable<ForeignKeyInformation> getForeignKeys(TableInformation tableInformation)
InformationExtractor
getForeignKeys
in interface InformationExtractor
tableInformation
- The table for which to locate foreign-keysCopyright © 2017 JBoss by Red Hat. All rights reserved.