public class TableMetaData extends Object
| Constructor and Description |
|---|
TableMetaData(ModelMetaData modelMetaData,
String modelTableName)
Creates a table meta instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
ColumnMetaData |
getColumnByName(String columnName)
Gets a column by its column name.
|
Collection<ColumnMetaData> |
getColumns()
Gets the meta data for columns.
|
String |
getComment()
Gets the comment.
|
Collection<ForeignKeyMetaData> |
getForeignKeys()
Gets the foreign keys.
|
String |
getFullTableName()
Gets the database table name with optional schemaname prepended.
Always in lowercase. |
Collection<IndexMetaData> |
getIndexes()
Gets the meta data for indexes.
|
ModelMetaData |
getModelMetaData()
Gets the model this table belongs to.
|
String |
getModelTableName()
Gets the table name used in the model.
|
String |
getSchemaName()
Gets the database schema name.
Always in lowercase. |
String |
getTableName()
Gets the database table name.
Always in lowercase. |
int |
hashCode() |
void |
setComment(String comment)
Sets the comment.
|
void |
setupTableFromMetaData(DatabaseMetaData metaData,
String[] schemas,
String schemaPattern,
String tablePattern)
Sets up the column from the database meta data result.
|
String |
toString() |
void |
validate()
Validates and postprocesses the table data.
|
public TableMetaData(ModelMetaData modelMetaData, String modelTableName)
modelMetaData - the model this table belongs tomodelTableName - the tablename used in the modelpublic void setupTableFromMetaData(DatabaseMetaData metaData, String[] schemas, String schemaPattern, String tablePattern) throws SQLException
metaData - the database metadataschemas - valid schemas to scan, null if allschemaPattern - the schema (null if none, "" if without schema)tablePattern - the table patternSQLException - the processing failedBackendException - if logical meta data processing errorpublic ModelMetaData getModelMetaData()
public String getModelTableName()
public String getSchemaName()
public String getTableName()
public String getFullTableName()
public String getComment()
public void setComment(String comment)
comment - the comment, null if nonepublic Collection<ColumnMetaData> getColumns()
public ColumnMetaData getColumnByName(String columnName)
columnName - the column namepublic Collection<IndexMetaData> getIndexes()
public Collection<ForeignKeyMetaData> getForeignKeys()
public void validate()
Tentackle - distributed, domain- and model-driven