Class Table

java.lang.Object
org.hibernate.mapping.Table
All Implemented Interfaces:
Serializable, RelationalModel
Direct Known Subclasses:
DenormalizedTable

public class Table extends Object implements RelationalModel, Serializable
A relational table
See Also:
  • Constructor Details

    • Table

      public Table()
    • Table

      public Table(String name)
  • Method Details

    • getQualifiedName

      public String getQualifiedName(Dialect dialect, String defaultCatalog, String defaultSchema)
    • qualify

      public static String qualify(String catalog, String schema, String table)
    • getName

      public String getName()
    • getQuotedName

      public String getQuotedName()
      returns quoted name as it would be in the mapping file.
    • getQuotedName

      public String getQuotedName(Dialect dialect)
    • getQuotedSchema

      public String getQuotedSchema()
      returns quoted name as it is in the mapping file.
    • getQuotedSchema

      public String getQuotedSchema(Dialect dialect)
    • setName

      public void setName(String name)
    • getColumn

      public Column getColumn(Column column)
      Return the column which is identified by column provided as argument.
      Parameters:
      column - column with atleast a name.
      Returns:
      the underlying column or null if not inside this table. Note: the instance *can* be different than the input parameter, but the name will be the same.
    • getColumn

      public Column getColumn(int n)
    • addColumn

      public void addColumn(Column column)
    • getColumnSpan

      public int getColumnSpan()
    • getColumnIterator

      public Iterator getColumnIterator()
    • getIndexIterator

      public Iterator getIndexIterator()
    • getForeignKeyIterator

      public Iterator getForeignKeyIterator()
    • getUniqueKeyIterator

      public Iterator getUniqueKeyIterator()
    • validateColumns

      public void validateColumns(Dialect dialect, Mapping mapping, TableMetadata tableInfo)
    • sqlAlterStrings

      public Iterator sqlAlterStrings(Dialect dialect, Mapping p, TableMetadata tableInfo, String defaultCatalog, String defaultSchema) throws HibernateException
      Throws:
      HibernateException
    • hasPrimaryKey

      public boolean hasPrimaryKey()
    • sqlTemporaryTableCreateString

      public String sqlTemporaryTableCreateString(Dialect dialect, Mapping mapping) throws HibernateException
      Throws:
      HibernateException
    • sqlCreateString

      public String sqlCreateString(Dialect dialect, Mapping p, String defaultCatalog, String defaultSchema)
      Specified by:
      sqlCreateString in interface RelationalModel
    • sqlDropString

      public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema)
      Specified by:
      sqlDropString in interface RelationalModel
    • getPrimaryKey

      public PrimaryKey getPrimaryKey()
    • setPrimaryKey

      public void setPrimaryKey(PrimaryKey primaryKey)
    • getOrCreateIndex

      public Index getOrCreateIndex(String indexName)
    • getIndex

      public Index getIndex(String indexName)
    • addIndex

      public Index addIndex(Index index)
    • addUniqueKey

      public UniqueKey addUniqueKey(UniqueKey uniqueKey)
    • createUniqueKey

      public UniqueKey createUniqueKey(List keyColumns)
    • getUniqueKey

      public UniqueKey getUniqueKey(String keyName)
    • getOrCreateUniqueKey

      public UniqueKey getOrCreateUniqueKey(String keyName)
    • createForeignKeys

      public void createForeignKeys()
    • createForeignKey

      public ForeignKey createForeignKey(String keyName, List keyColumns, String referencedEntityName)
    • createForeignKey

      public ForeignKey createForeignKey(String keyName, List keyColumns, String referencedEntityName, List referencedColumns)
    • uniqueColumnString

      public String uniqueColumnString(Iterator iterator)
    • uniqueColumnString

      public String uniqueColumnString(Iterator iterator, String referencedEntityName)
    • getSchema

      public String getSchema()
    • setSchema

      public void setSchema(String schema)
    • getCatalog

      public String getCatalog()
    • setCatalog

      public void setCatalog(String catalog)
    • getUniqueInteger

      public int getUniqueInteger()
    • setIdentifierValue

      public void setIdentifierValue(KeyValue idValue)
    • getIdentifierValue

      public KeyValue getIdentifierValue()
    • isSchemaQuoted

      public boolean isSchemaQuoted()
    • isQuoted

      public boolean isQuoted()
    • setQuoted

      public void setQuoted(boolean quoted)
    • addCheckConstraint

      public void addCheckConstraint(String constraint)
    • containsColumn

      public boolean containsColumn(Column column)
    • getRowId

      public String getRowId()
    • setRowId

      public void setRowId(String rowId)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSubselect

      public String getSubselect()
    • setSubselect

      public void setSubselect(String subselect)
    • isSubselect

      public boolean isSubselect()
    • isAbstractUnionTable

      public boolean isAbstractUnionTable()
    • hasDenormalizedTables

      public boolean hasDenormalizedTables()
    • setAbstract

      public void setAbstract(boolean isAbstract)
    • isAbstract

      public boolean isAbstract()
    • isPhysicalTable

      public boolean isPhysicalTable()
    • getComment

      public String getComment()
    • setComment

      public void setComment(String comment)
    • getCheckConstraintsIterator

      public Iterator getCheckConstraintsIterator()
    • sqlCommentStrings

      public Iterator sqlCommentStrings(Dialect dialect, String defaultCatalog, String defaultSchema)