类 Table
- java.lang.Object
-
- org.hibernate.mapping.Table
-
- 所有已实现的接口:
Serializable,Exportable,RelationalModel
- 直接已知子类:
DenormalizedTable
public class Table extends Object implements RelationalModel, Serializable, Exportable
A relational table- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classTable.ForeignKeyKey
-
构造器概要
构造器 构造器 说明 Table()Table(String name)Table(Identifier catalog, Identifier schema, Identifier physicalTableName, boolean isAbstract)Table(Namespace namespace, String subselect, boolean isAbstract)Table(Namespace namespace, Identifier physicalTableName, boolean isAbstract)Table(Namespace namespace, Identifier physicalTableName, String subselect, boolean isAbstract)
-
方法概要
-
-
-
构造器详细资料
-
Table
public Table()
-
Table
public Table(String name)
-
Table
public Table(Namespace namespace, Identifier physicalTableName, boolean isAbstract)
-
Table
public Table(Identifier catalog, Identifier schema, Identifier physicalTableName, boolean isAbstract)
-
Table
public Table(Namespace namespace, Identifier physicalTableName, String subselect, boolean isAbstract)
-
-
方法详细资料
-
getQualifiedName
@Deprecated public String getQualifiedName(Dialect dialect, String defaultCatalog, String defaultSchema)
已过时。Should useQualifiedObjectNameFormatter.format(org.hibernate.boot.model.relational.QualifiedTableName, org.hibernate.dialect.Dialect)on QualifiedObjectNameFormatter obtained fromJdbcEnvironment
-
qualify
@Deprecated public static String qualify(String catalog, String schema, String table)
已过时。Should useQualifiedObjectNameFormatter.format(org.hibernate.boot.model.relational.QualifiedTableName, org.hibernate.dialect.Dialect)on QualifiedObjectNameFormatter obtained fromJdbcEnvironment
-
setName
public void setName(String name)
-
getName
public String getName()
-
getNameIdentifier
public Identifier getNameIdentifier()
-
getQuotedName
public String getQuotedName()
-
getQualifiedTableName
public QualifiedTableName getQualifiedTableName()
-
isQuoted
public boolean isQuoted()
-
setQuoted
public void setQuoted(boolean quoted)
-
setSchema
public void setSchema(String schema)
-
getSchema
public String getSchema()
-
getQuotedSchema
public String getQuotedSchema()
-
isSchemaQuoted
public boolean isSchemaQuoted()
-
setCatalog
public void setCatalog(String catalog)
-
getCatalog
public String getCatalog()
-
getQuotedCatalog
public String getQuotedCatalog()
-
isCatalogQuoted
public boolean isCatalogQuoted()
-
getColumn
public Column getColumn(Column column)
Return the column which is identified by column provided as argument.- 参数:
column- column with at least a name.- 返回:
- 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(Identifier name)
-
getColumn
public Column getColumn(int n)
-
addColumn
public void addColumn(Column column)
-
getColumnSpan
public int getColumnSpan()
-
getColumnIterator
public Iterator getColumnIterator()
-
getForeignKeyIterator
public Iterator getForeignKeyIterator()
-
getForeignKeys
public Map<Table.ForeignKeyKey,ForeignKey> getForeignKeys()
-
equals
public boolean equals(Table table)
-
validateColumns
public void validateColumns(Dialect dialect, Mapping mapping, TableMetadata tableInfo)
-
sqlAlterStrings
public Iterator sqlAlterStrings(Dialect dialect, Metadata metadata, TableInformation tableInfo, Identifier defaultCatalog, Identifier defaultSchema) throws HibernateException
-
hasPrimaryKey
public boolean hasPrimaryKey()
-
sqlCreateString
public String sqlCreateString(Dialect dialect, Mapping p, String defaultCatalog, String defaultSchema)
- 指定者:
sqlCreateString在接口中RelationalModel
-
sqlDropString
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema)
- 指定者:
sqlDropString在接口中RelationalModel
-
getPrimaryKey
public PrimaryKey getPrimaryKey()
-
setPrimaryKey
public void setPrimaryKey(PrimaryKey primaryKey)
-
createForeignKeys
public void createForeignKeys()
-
createForeignKey
public ForeignKey createForeignKey(String keyName, List keyColumns, String referencedEntityName, String keyDefinition)
-
createForeignKey
public ForeignKey createForeignKey(String keyName, List keyColumns, String referencedEntityName, String keyDefinition, List referencedColumns)
-
setUniqueInteger
public void setUniqueInteger(int uniqueInteger)
-
getUniqueInteger
public int getUniqueInteger()
-
setIdentifierValue
public void setIdentifierValue(KeyValue idValue)
-
getIdentifierValue
public KeyValue getIdentifierValue()
-
addCheckConstraint
public void addCheckConstraint(String constraint)
-
containsColumn
public boolean containsColumn(Column column)
-
getRowId
public String getRowId()
-
setRowId
public void setRowId(String rowId)
-
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)
-
sqlCommentStrings
public Iterator sqlCommentStrings(Dialect dialect, String defaultCatalog, String defaultSchema)
-
getExportIdentifier
public String getExportIdentifier()
从接口复制的说明:ExportableGet a unique identifier to make sure we are not exporting the same database structure multiple times.- 指定者:
getExportIdentifier在接口中Exportable- 返回:
- The exporting identifier.
-
addInitCommand
public void addInitCommand(InitCommand command)
-
getInitCommands
public List<InitCommand> getInitCommands()
-
-