public class Table extends AbstractTableSpecification implements Exportable
Constructor and Description |
---|
Table(Schema database,
Identifier tableName) |
Table(Schema database,
String tableName) |
Modifier and Type | Method and Description |
---|---|
void |
addCheckConstraint(String checkCondition) |
void |
addComment(String comment) |
Iterable<CheckConstraint> |
getCheckConstraints() |
Iterable<String> |
getComments() |
String |
getExportIdentifier()
Get a unique identifier to make sure we are not exporting the same database structure multiple times.
|
Iterable<Index> |
getIndexes() |
String |
getLoggableValueQualifier()
Get a qualifier which can be used to qualify
values belonging to this container in
their logging. |
Index |
getOrCreateIndex(String name) |
UniqueKey |
getOrCreateUniqueKey(String name) |
String |
getQualifiedName(Dialect dialect) |
Schema |
getSchema()
Obtain a reference to the schema to which this table specification belongs.
|
Identifier |
getTableName() |
Iterable<UniqueKey> |
getUniqueKeys() |
String[] |
sqlCreateStrings(Dialect dialect)
Gets the SQL strings for creating the database object.
|
String[] |
sqlDropStrings(Dialect dialect)
Gets the SQL strings for dropping the database object.
|
String |
toLoggableString()
Obtain the string representation of this value usable in log statements.
|
String |
toString() |
createForeignKey, createTuple, getForeignKeys, getPrimaryKey, getTableNumber, locateOrCreateColumn, locateOrCreateDerivedValue, values
public Table(Schema database, Identifier tableName)
public Schema getSchema()
TableSpecification
getSchema
in interface TableSpecification
public Identifier getTableName()
public String getLoggableValueQualifier()
ValueContainer
values
belonging to this container in
their logging.getLoggableValueQualifier
in interface ValueContainer
public String getExportIdentifier()
Exportable
getExportIdentifier
in interface Exportable
public String toLoggableString()
Loggable
toLoggableString
in interface Loggable
public Iterable<Index> getIndexes()
getIndexes
in interface TableSpecification
public Index getOrCreateIndex(String name)
getOrCreateIndex
in interface TableSpecification
public Iterable<UniqueKey> getUniqueKeys()
getUniqueKeys
in interface TableSpecification
public UniqueKey getOrCreateUniqueKey(String name)
getOrCreateUniqueKey
in interface TableSpecification
public Iterable<CheckConstraint> getCheckConstraints()
getCheckConstraints
in interface TableSpecification
public void addCheckConstraint(String checkCondition)
addCheckConstraint
in interface TableSpecification
public Iterable<String> getComments()
getComments
in interface TableSpecification
public void addComment(String comment)
addComment
in interface TableSpecification
public String getQualifiedName(Dialect dialect)
getQualifiedName
in interface TableSpecification
public String[] sqlCreateStrings(Dialect dialect)
Exportable
sqlCreateStrings
in interface Exportable
dialect
- The dialect for which to generate the SQL creation stringspublic String[] sqlDropStrings(Dialect dialect)
Exportable
sqlDropStrings
in interface Exportable
dialect
- The dialect for which to generate the SQL drop stringsCopyright © 2012 JBoss by Red Hat. All Rights Reserved.