org.hibernate.metamodel.relational
Class Table

java.lang.Object
  extended by org.hibernate.metamodel.relational.AbstractTableSpecification
      extended by org.hibernate.metamodel.relational.Table
All Implemented Interfaces:
Exportable, Loggable, TableSpecification, ValueContainer

public class Table
extends AbstractTableSpecification
implements Exportable

Models the concept of a relational TABLE (or VIEW).


Constructor Summary
Table(Schema database, Identifier tableName)
           
Table(Schema database, String tableName)
           
 
Method Summary
 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()
           
 
Methods inherited from class org.hibernate.metamodel.relational.AbstractTableSpecification
createForeignKey, createTuple, getForeignKeys, getPrimaryKey, getTableNumber, locateOrCreateColumn, locateOrCreateDerivedValue, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Table

public Table(Schema database,
             String tableName)

Table

public Table(Schema database,
             Identifier tableName)
Method Detail

getSchema

public Schema getSchema()
Description copied from interface: TableSpecification
Obtain a reference to the schema to which this table specification belongs.

Specified by:
getSchema in interface TableSpecification
Returns:
The schema to which this table specification belongs.

getTableName

public Identifier getTableName()

getLoggableValueQualifier

public String getLoggableValueQualifier()
Description copied from interface: ValueContainer
Get a qualifier which can be used to qualify values belonging to this container in their logging.

Specified by:
getLoggableValueQualifier in interface ValueContainer
Returns:
The qualifier

getExportIdentifier

public String getExportIdentifier()
Description copied from interface: Exportable
Get a unique identifier to make sure we are not exporting the same database structure multiple times.

Specified by:
getExportIdentifier in interface Exportable
Returns:
The exporting identifier.

toLoggableString

public String toLoggableString()
Description copied from interface: Loggable
Obtain the string representation of this value usable in log statements.

Specified by:
toLoggableString in interface Loggable
Returns:
The loggable representation

getIndexes

public Iterable<Index> getIndexes()
Specified by:
getIndexes in interface TableSpecification

getOrCreateIndex

public Index getOrCreateIndex(String name)
Specified by:
getOrCreateIndex in interface TableSpecification

getUniqueKeys

public Iterable<UniqueKey> getUniqueKeys()
Specified by:
getUniqueKeys in interface TableSpecification

getOrCreateUniqueKey

public UniqueKey getOrCreateUniqueKey(String name)
Specified by:
getOrCreateUniqueKey in interface TableSpecification

getCheckConstraints

public Iterable<CheckConstraint> getCheckConstraints()
Specified by:
getCheckConstraints in interface TableSpecification

addCheckConstraint

public void addCheckConstraint(String checkCondition)
Specified by:
addCheckConstraint in interface TableSpecification

getComments

public Iterable<String> getComments()
Specified by:
getComments in interface TableSpecification

addComment

public void addComment(String comment)
Specified by:
addComment in interface TableSpecification

getQualifiedName

public String getQualifiedName(Dialect dialect)
Specified by:
getQualifiedName in interface TableSpecification

sqlCreateStrings

public String[] sqlCreateStrings(Dialect dialect)
Description copied from interface: Exportable
Gets the SQL strings for creating the database object.

Specified by:
sqlCreateStrings in interface Exportable
Returns:
the SQL strings for creating the database object.

sqlDropStrings

public String[] sqlDropStrings(Dialect dialect)
Description copied from interface: Exportable
Gets the SQL strings for dropping the database object.

Specified by:
sqlDropStrings in interface Exportable

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.