Top Description Inners Fields Constructors Methods
org.hibernate.mapping

public Class Table

extends Object
implements Serializable, ContributableDatabaseObject
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.model.relational.ContributableDatabaseObject, org.hibernate.boot.model.relational.Exportable, org.hibernate.mapping.Contributable, java.io.Serializable
Known Direct Subclasses
org.hibernate.mapping.DenormalizedTable
Imports
java.io.Serializable, java.util.ArrayList, .Arrays, .Collection, .Iterator, .LinkedHashMap, .List, .Map, .Objects, java.util.function.Function, org.hibernate.HibernateException, .Internal, .MappingException, .Remove, org.hibernate.boot.Metadata, org.hibernate.boot.model.naming.Identifier, org.hibernate.boot.model.relational.ContributableDatabaseObject, .InitCommand, .Namespace, .QualifiedTableName, .SqlStringGenerationContext, org.hibernate.boot.spi.InFlightMetadataCollector, org.hibernate.dialect.Dialect, org.hibernate.tool.schema.extract.spi.TableInformation, org.hibernate.tool.schema.internal.StandardTableMigrator, org.jboss.logging.Logger

A mapping model object representing a relational database table.
Author
Gavin King

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private Identifier
private final List<CheckConstraint>
private final Map<String, Column>
columns

contains all columns, including the primary key

private String
private final String
private static final Column[]
private final Map<Table.ForeignKeyKey, ForeignKey>
private boolean
private KeyValue
private final Map<String, Index>
private List<Function<SqlStringGenerationContext, InitCommand>>
private boolean
private static final Logger
private Identifier
private PrimaryKey
private String
private Identifier
private int
private String
private int
private final Map<String, UniqueKey>
private String

Constructor Summary

AccessConstructor and Description
public
Table()

Deprecated for removal since 6.2.
public
Table(String contributor)

public
Table(String contributor, String name)

public
Table(String contributor, Namespace namespace, Identifier physicalTableName, boolean isAbstract)

public
Table(String contributor, Namespace namespace, Identifier physicalTableName, String subselect, boolean isAbstract)

public
Table(String contributor, Namespace namespace, String subselect, boolean isAbstract)

Method Summary

Modifier and TypeMethod and Description
public void
public void
addCheckConstraint(String constraint)

Deprecated since 6.2.
public void
addColumn(Column column)

public Index
addIndex(Index index)

public void
addInitCommand(InitCommand command)

Deprecated Use addInitCommand(Function) instead.
public void
public UniqueKey
private void
checkPrimaryKeyUniqueKey()

Checks for uniqueKey containing only whole primary key and sets order of the columns accordingly

private void
private void
public void
public boolean
public ForeignKey
createForeignKey(String keyName, List<Column> keyColumns, String referencedEntityName, String keyDefinition)

public ForeignKey
createForeignKey(String keyName, List<Column> keyColumns, String referencedEntityName, String keyDefinition, List<Column> referencedColumns)

public void
public void
createUniqueKey(List<Column> keyColumns)

If there is one given column, mark it unique, otherwise create a UniqueKey comprising the given columns.

public boolean
equals(Object
the reference object with which to compare.
object
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public boolean
equals(Table table)

public String
public Identifier
public List<String>
getCheckConstraints()

Deprecated since 6.2.
public Iterator<String>
getCheckConstraintsIterator()

Deprecated since 6.0.
public List<CheckConstraint>
public Column

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
(Column
column with at least a name.
column
)

Return the column which is identified by column provided as argument.

public Column
public Column
getColumn(InFlightMetadataCollector collector, String logicalName)

Deprecated as a consequence of InFlightMetadataCollector being deprecated.
public Column
getColumn(int n)

public Collection<Column>
public int
public String
public String
getContributor()

Implements org.hibernate.mapping.Contributable.getContributor.

The name of the contributor which contributed this
public String
getExportIdentifier()

Implements org.hibernate.boot.model.relational.Exportable.getExportIdentifier.

Get a unique identifier to make sure we are not exporting the same database structure multiple times.
public Iterator<ForeignKey>
getForeignKeyIterator()

Deprecated since 6.0.
public Map<Table.ForeignKeyKey, ForeignKey>
public KeyValue
public Index
getIndex(String indexName)

public Map<String, Index>
public List<InitCommand>
public String
public Identifier
public Index
public UniqueKey
public PrimaryKey
public String
public QualifiedTableName
public String
public String
public String
public String
public String
public String
public String
public String
public Identifier
public String
public int
public UniqueKey
public Iterator<UniqueKey>
getUniqueKeyIterator()

Deprecated since 6.0.
public Map<String, UniqueKey>
public String
public boolean
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
private boolean
public boolean
public boolean
public boolean
public static String
qualify(String catalog, String schema, String table)

private String
render(Identifier identifier)

public void
public void
setAbstract(boolean isAbstract)

public void
setCatalog(String catalog)

public void
setComment(String comment)

pack-priv void
public void
public void
public void
public void
setQuoted(boolean quoted)

public void
public void
setSchema(String schema)

public void
setSubselect(String subselect)

public void
setUniqueInteger(int uniqueInteger)

public void
setViewQuery(String viewQuery)

public @Remove Iterator<String>
sqlAlterStrings(Dialect dialect, Metadata metadata, TableInformation tableInfo, SqlStringGenerationContext sqlStringGenerationContext)

Deprecated since 6.2.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait