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 TypeMethodDescriptionvoid
addColumn
(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()
boolean
Does 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:TableInformation
Get the qualified name of the table.- Specified by:
getName
in interfaceTableInformation
- Returns:
- The qualified table name
-
isPhysicalTable
public boolean isPhysicalTable()Description copied from interface:TableInformation
Does this information describe a physical table as opposed to a view, etc?- Specified by:
isPhysicalTable
in interfaceTableInformation
- Returns:
true
if this is a physical table;false
otherwise.
-
getComment
Description copied from interface:TableInformation
Get the comments/remarks defined for the table.- Specified by:
getComment
in interfaceTableInformation
- Returns:
- The table comments
-
getColumn
Description copied from interface:TableInformation
Retrieve the named ColumnInformation- Specified by:
getColumn
in interfaceTableInformation
- Parameters:
columnIdentifier
- The column identifier (simple name)- Returns:
- The matching column information. May return
null
-
getPrimaryKey
Description copied from interface:TableInformation
Retrieve information about the table's primary key, if one is defined (aka, may returnnull
).- Specified by:
getPrimaryKey
in interfaceTableInformation
- Returns:
- The primary key information, or
null
if the table did not define a primary key.
-
getForeignKeys
Description copied from interface:TableInformation
Obtain an iterable over all the table's defined foreign keys.- Specified by:
getForeignKeys
in interfaceTableInformation
- Returns:
- The iterable.
-
foreignKeys
-
getForeignKey
Description copied from interface:TableInformation
Retrieve the named ForeignKeyInformation- Specified by:
getForeignKey
in interfaceTableInformation
- Parameters:
fkIdentifier
- The foreign key identifier (simple name)- Returns:
- The matching foreign key information. May return
null
-
getIndexes
Description copied from interface:TableInformation
Obtain an iterable over all the table's defined indexes.- Specified by:
getIndexes
in interfaceTableInformation
- Returns:
- The iterable.
-
indexes
-
addColumn
- Specified by:
addColumn
in interfaceTableInformation
-
getIndex
Description copied from interface:TableInformation
Retrieve the named IndexInformation- Specified by:
getIndex
in interfaceTableInformation
- Parameters:
indexName
- The index identifier (simple name)- Returns:
- The matching index information. May return
null
-
toString
-