Class TableInformationImpl
java.lang.Object
org.hibernate.tool.schema.extract.internal.TableInformationImpl
- All Implemented Interfaces:
TableInformation
Provides access to information about existing schema objects (tables, sequences etc) of existing database.
-
Constructor Summary
ConstructorsConstructorDescriptionTableInformationImpl(InformationExtractor extractor, IdentifierHelper identifierHelper, QualifiedTableName tableName, boolean physicalTable, String comment) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(ColumnInformation columnIdentifier) protected Map<Identifier,ForeignKeyInformation> getColumn(Identifier columnIdentifier) Retrieve the named ColumnInformationGet the comments/remarks defined for the table.getForeignKey(Identifier fkIdentifier) Retrieve the named ForeignKeyInformationObtain an iterable over all the table's defined foreign keys.getIndex(Identifier indexName) Retrieve the named IndexInformationObtain an iterable over all the table's defined indexes.getName()Get the qualified name of the table.Retrieve information about the table's primary key, if one is defined (aka, may returnnull).protected Map<Identifier,IndexInformation> indexes()booleanDoes this information describe a physical table as opposed to a view, etc?toString()
-
Constructor Details
-
TableInformationImpl
public TableInformationImpl(InformationExtractor extractor, IdentifierHelper identifierHelper, QualifiedTableName tableName, boolean physicalTable, String comment)
-
-
Method Details
-
getName
Description copied from interface:TableInformationGet the qualified name of the table.- Specified by:
getNamein interfaceTableInformation- Returns:
- The qualified table name
-
isPhysicalTable
public boolean isPhysicalTable()Description copied from interface:TableInformationDoes this information describe a physical table as opposed to a view, etc?- Specified by:
isPhysicalTablein interfaceTableInformation- Returns:
trueif this is a physical table;falseotherwise.
-
getComment
Description copied from interface:TableInformationGet the comments/remarks defined for the table.- Specified by:
getCommentin interfaceTableInformation- Returns:
- The table comments
-
getColumn
Description copied from interface:TableInformationRetrieve the named ColumnInformation- Specified by:
getColumnin interfaceTableInformation- Parameters:
columnIdentifier- The column identifier (simple name)- Returns:
- The matching column information. May return
null
-
getPrimaryKey
Description copied from interface:TableInformationRetrieve information about the table's primary key, if one is defined (aka, may returnnull).- Specified by:
getPrimaryKeyin interfaceTableInformation- Returns:
- The primary key information, or
nullif the table did not define a primary key.
-
getForeignKeys
Description copied from interface:TableInformationObtain an iterable over all the table's defined foreign keys.- Specified by:
getForeignKeysin interfaceTableInformation- Returns:
- The iterable.
-
foreignKeys
-
getForeignKey
Description copied from interface:TableInformationRetrieve the named ForeignKeyInformation- Specified by:
getForeignKeyin interfaceTableInformation- Parameters:
fkIdentifier- The foreign key identifier (simple name)- Returns:
- The matching foreign key information. May return
null
-
getIndexes
Description copied from interface:TableInformationObtain an iterable over all the table's defined indexes.- Specified by:
getIndexesin interfaceTableInformation- Returns:
- The iterable.
-
indexes
-
addColumn
- Specified by:
addColumnin interfaceTableInformation
-
getIndex
Description copied from interface:TableInformationRetrieve the named IndexInformation- Specified by:
getIndexin interfaceTableInformation- Parameters:
indexName- The index identifier (simple name)- Returns:
- The matching index information. May return
null
-
toString
-