public interface DatabaseMetaDataSupport
Modifier and Type | Method and Description |
---|---|
<T> T |
find(java.util.Map<java.lang.String,T> map,
java.lang.String name,
java.util.List<java.lang.String> defaultSchemaList)
Locates an object from a map keyed by schema qualified name.
|
java.util.Map<java.lang.String,ColumnProperties> |
getColumns(java.sql.DatabaseMetaData metaData,
QualifiedName table)
Returns the columns of the specified table.
|
java.util.Collection<ForeignKeyConstraint> |
getForeignKeyConstraints(java.sql.DatabaseMetaData metaData,
QualifiedName table)
Returns the foreign key constraints on the specified table.
|
java.util.Collection<java.lang.String> |
getIdentityColumns(java.util.Collection<ColumnProperties> columns)
Identifies any identity columns from the from the specified collection of columns
|
UniqueConstraint |
getPrimaryKey(java.sql.DatabaseMetaData metaData,
QualifiedName table)
Returns the primary key of the specified table.
|
java.util.Collection<SequenceProperties> |
getSequences(java.sql.DatabaseMetaData metaData)
Returns a collection of sequences using dialect specific logic.
|
java.util.Collection<QualifiedName> |
getTables(java.sql.DatabaseMetaData metaData)
Returns all tables in this database mapped by schema.
|
java.util.Collection<UniqueConstraint> |
getUniqueConstraints(java.sql.DatabaseMetaData metaData,
QualifiedName table,
UniqueConstraint primaryKey)
Returns the unique constraints on the specified table - excluding the primary key of the table.
|
java.lang.String |
qualifyNameForDDL(QualifiedName name)
Returns the schema qualified name of the specified table suitable for use in a data definition language (DDL) statement.
|
java.lang.String |
qualifyNameForDML(QualifiedName name)
Returns the schema qualified name of the specified table suitable for use in a data modification language (DML) statement.
|
java.util.Collection<QualifiedName> getTables(java.sql.DatabaseMetaData metaData) throws java.sql.SQLException
metaData
- a DatabaseMetaData implementationjava.sql.SQLException
- if an error occurs access DatabaseMetaDatajava.util.Map<java.lang.String,ColumnProperties> getColumns(java.sql.DatabaseMetaData metaData, QualifiedName table) throws java.sql.SQLException
metaData
- a DatabaseMetaData implementationtable
- a schema qualified table namejava.sql.SQLException
- if an error occurs access DatabaseMetaDataUniqueConstraint getPrimaryKey(java.sql.DatabaseMetaData metaData, QualifiedName table) throws java.sql.SQLException
metaData
- a DatabaseMetaData implementationtable
- a schema qualified table namejava.sql.SQLException
- if an error occurs access DatabaseMetaDatajava.util.Collection<ForeignKeyConstraint> getForeignKeyConstraints(java.sql.DatabaseMetaData metaData, QualifiedName table) throws java.sql.SQLException
metaData
- a DatabaseMetaData implementationtable
- a schema qualified table namejava.sql.SQLException
- if an error occurs access DatabaseMetaDatajava.util.Collection<UniqueConstraint> getUniqueConstraints(java.sql.DatabaseMetaData metaData, QualifiedName table, UniqueConstraint primaryKey) throws java.sql.SQLException
metaData
- a schema qualified table nametable
- a qualified table nameprimaryKey
- the primary key of this tablejava.sql.SQLException
- if an error occurs access DatabaseMetaDatajava.lang.String qualifyNameForDML(QualifiedName name)
name
- a schema qualified namejava.lang.String qualifyNameForDDL(QualifiedName name)
name
- a schema qualified namejava.util.Collection<SequenceProperties> getSequences(java.sql.DatabaseMetaData metaData) throws java.sql.SQLException
metaData
- database meta datajava.sql.SQLException
<T> T find(java.util.Map<java.lang.String,T> map, java.lang.String name, java.util.List<java.lang.String> defaultSchemaList) throws java.sql.SQLException
T
- an objectmap
- a map of databasename
- the name of the object to locatedefaultSchemaList
- a list of default schemasjava.sql.SQLException
java.util.Collection<java.lang.String> getIdentityColumns(java.util.Collection<ColumnProperties> columns) throws java.sql.SQLException
columns
- the columns of a tablejava.sql.SQLException