public class Table extends Object implements RelationalModel, Serializable, Exportable
A relational table
Modifier and Type | Class and Description |
---|---|
static class |
Table.ForeignKeyKey |
Constructor and Description |
---|
Table() |
Table(Identifier catalog,
Identifier schema,
Identifier physicalTableName,
boolean isAbstract) |
Table(Namespace namespace,
Identifier physicalTableName,
boolean isAbstract) |
Table(Namespace namespace,
Identifier physicalTableName,
String subselect,
boolean isAbstract) |
Table(Namespace namespace,
String subselect,
boolean isAbstract) |
Table(String name) |
public Table()
public Table(String name)
public Table(Namespace namespace, Identifier physicalTableName, boolean isAbstract)
public Table(Identifier catalog, Identifier schema, Identifier physicalTableName, boolean isAbstract)
public Table(Namespace namespace, Identifier physicalTableName, String subselect, boolean isAbstract)
@Deprecated public String getQualifiedName(Dialect dialect, String defaultCatalog, String defaultSchema)
QualifiedObjectNameFormatter.format(org.hibernate.boot.model.relational.QualifiedTableName, org.hibernate.dialect.Dialect)
on QualifiedObjectNameFormatter
obtained from JdbcEnvironment
@Deprecated public static String qualify(String catalog, String schema, String table)
QualifiedObjectNameFormatter.format(org.hibernate.boot.model.relational.QualifiedTableName, org.hibernate.dialect.Dialect)
on QualifiedObjectNameFormatter
obtained from JdbcEnvironment
public void setName(String name)
public String getName()
public Identifier getNameIdentifier()
public String getQuotedName()
public QualifiedTableName getQualifiedTableName()
public boolean isQuoted()
public void setQuoted(boolean quoted)
public void setSchema(String schema)
public String getSchema()
public String getQuotedSchema()
public boolean isSchemaQuoted()
public void setCatalog(String catalog)
public String getCatalog()
public String getQuotedCatalog()
public boolean isCatalogQuoted()
public Column getColumn(Column column)
Return the column which is identified by column provided as argument.
column
- column with atleast a name.public Column getColumn(Identifier name)
public Column getColumn(int n)
public void addColumn(Column column)
public int getColumnSpan()
public Iterator getColumnIterator()
public Iterator getForeignKeyIterator()
public Map<Table.ForeignKeyKey,ForeignKey> getForeignKeys()
public boolean equals(Table table)
public void validateColumns(Dialect dialect, Mapping mapping, TableMetadata tableInfo)
public Iterator sqlAlterStrings(Dialect dialect, Metadata metadata, TableInformation tableInfo, String defaultCatalog, String defaultSchema) throws HibernateException
HibernateException
public boolean hasPrimaryKey()
public String sqlCreateString(Dialect dialect, Mapping p, String defaultCatalog, String defaultSchema)
sqlCreateString
in interface RelationalModel
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema)
sqlDropString
in interface RelationalModel
public PrimaryKey getPrimaryKey()
public void setPrimaryKey(PrimaryKey primaryKey)
public void createForeignKeys()
public ForeignKey createForeignKey(String keyName, List keyColumns, String referencedEntityName, String keyDefinition)
public ForeignKey createForeignKey(String keyName, List keyColumns, String referencedEntityName, String keyDefinition, List referencedColumns)
public void setUniqueInteger(int uniqueInteger)
public int getUniqueInteger()
public void setIdentifierValue(KeyValue idValue)
public KeyValue getIdentifierValue()
public void addCheckConstraint(String constraint)
public boolean containsColumn(Column column)
public String getRowId()
public void setRowId(String rowId)
public String getSubselect()
public void setSubselect(String subselect)
public boolean isSubselect()
public boolean isAbstractUnionTable()
public boolean hasDenormalizedTables()
public void setAbstract(boolean isAbstract)
public boolean isAbstract()
public boolean isPhysicalTable()
public String getComment()
public void setComment(String comment)
public Iterator sqlCommentStrings(Dialect dialect, String defaultCatalog, String defaultSchema)
public String getExportIdentifier()
Exportable
Get a unique identifier to make sure we are not exporting the same database structure multiple times.
getExportIdentifier
in interface Exportable
public void addInitCommand(InitCommand command)
public List<InitCommand> getInitCommands()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.