public interface DatabaseMetaDataReader
Modifier and Type | Method and Description |
---|---|
Iterable<? extends Field> |
getFields(DatabaseMetaData databaseMetaData,
String tableName) |
Iterable<? extends ForeignKey> |
getForeignKeys(DatabaseMetaData databaseMetaData,
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 databaseMetaData)
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.
|
boolean isTablePresent(DatabaseMetaData databaseMetaData, Class<? extends RawEntity<?>> type)
databaseMetaData
- of the database to be checkedtype
- to check againstIterable<String> getTableNames(DatabaseMetaData databaseMetaData)
Iterable<? extends Field> getFields(DatabaseMetaData databaseMetaData, String tableName)
databaseMetaData
- tableName
- Iterable<? extends ForeignKey> getForeignKeys(DatabaseMetaData databaseMetaData, String tableName)
databaseMetaData
- the database metadata to read the information fromtableName
- the name of the table from which to read the foreign keysIterable
of foreign keysIterable<? extends Index> getIndexes(DatabaseMetaData databaseMetaData, String tableName)
databaseMetaData
- the database metadata to read the information fromtableName
- the name of the table from which to read the indexesIterable
of simple indexesCopyright © 2007–2022 Atlassian. All rights reserved.