public class DatabaseMetaDataReaderImpl extends Object implements DatabaseMetaDataReader
| Constructor and Description |
|---|
DatabaseMetaDataReaderImpl(DatabaseProvider databaseProvider,
NameConverters nameConverters,
SchemaConfiguration schemaConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<? extends Field> |
getFields(DatabaseMetaData databaseMetaData,
String tableName) |
Iterable<ForeignKey> |
getForeignKeys(DatabaseMetaData metaData,
String tableName)
Gets the list of foreign keys for a given table
|
Iterable<? extends Index> |
getIndexes(DatabaseMetaData databaseMetaData,
String tableName)
Gets the list of simple indexes for a given table.
|
Iterable<String> |
getTableNames(DatabaseMetaData metaData)
Gets the names of the existing tables in the DB
|
boolean |
isTablePresent(DatabaseMetaData databaseMetaData,
Class<? extends RawEntity<?>> type)
Checks if the table corresponding to given type exists in the database.
|
public DatabaseMetaDataReaderImpl(DatabaseProvider databaseProvider, NameConverters nameConverters, SchemaConfiguration schemaConfiguration)
public boolean isTablePresent(DatabaseMetaData databaseMetaData, Class<? extends RawEntity<?>> type)
DatabaseMetaDataReaderisTablePresent in interface DatabaseMetaDataReaderdatabaseMetaData - of the database to be checkedtype - to check againstpublic Iterable<String> getTableNames(DatabaseMetaData metaData)
DatabaseMetaDataReadergetTableNames in interface DatabaseMetaDataReadermetaData - the meta data from which to extract the table namesIterable of table names as stringspublic Iterable<? extends Field> getFields(DatabaseMetaData databaseMetaData, String tableName)
getFields in interface DatabaseMetaDataReaderpublic Iterable<? extends Index> getIndexes(DatabaseMetaData databaseMetaData, String tableName)
DatabaseMetaDataReadergetIndexes in interface DatabaseMetaDataReaderdatabaseMetaData - the database metadata to read the information fromtableName - the name of the table from which to read the indexesIterable of simple indexespublic Iterable<ForeignKey> getForeignKeys(DatabaseMetaData metaData, String tableName)
DatabaseMetaDataReadergetForeignKeys in interface DatabaseMetaDataReadermetaData - the database metadata to read the information fromtableName - the name of the table from which to read the foreign keysIterable of foreign keysCopyright © 2007–2022 Atlassian. All rights reserved.