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