public class JdbcTable extends Object
| Constructor and Description |
|---|
JdbcTable(DatabaseMetaData dbMetadata,
ResultSet metadata) |
| Modifier and Type | Method and Description |
|---|---|
JdbcColumn |
getColumn(String name)
Returns the column metadata for the column with the name.
|
JdbcForeignKey |
getForeignKey(String name)
Returns the foreign key with then name.
|
Collection<JdbcForeignKey> |
getForeignKeys()
Returns the foreign keys of the table.
|
JdbcIndex |
getIndex(String name)
Returns the index with then name.
|
String |
getName()
Returns the name of the table.
|
String |
getPkName()
Returns the primary key name of the table.
|
String |
getSchema()
Returns the schema of the table.
|
void |
logNotNullExtraColumns(Collection<String> columns)
Logs the list of columns that do now exist in the persistence unit yet not nullable.
|
boolean |
requiresPkDrop(Set<String> pkColumnNames)
Returns if primary key drop is required.
|
public JdbcTable(DatabaseMetaData dbMetadata, ResultSet metadata) throws SQLException
dbMetadata - the JDBC database metadatametadata - the table metadata obtained from the JDBC database metadataSQLException - thrown in case of an SQL error.public JdbcColumn getColumn(String name)
name - the name of the columnpublic JdbcForeignKey getForeignKey(String name)
name - the name of the foreign keypublic Collection<JdbcForeignKey> getForeignKeys()
public JdbcIndex getIndex(String name)
name - the name of the indexpublic String getName()
public String getPkName()
public String getSchema()
public void logNotNullExtraColumns(Collection<String> columns)
columns - the set of columnsCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.