Top Description Fields Constructors Methods
org.hibernate.tool.schema.extract.internal

public Class TableInformationImpl

extends Object
implements TableInformation
Class Inheritance
All Implemented Interfaces
org.hibernate.tool.schema.extract.spi.TableInformation
Imports
java.util.HashMap, .Map, org.hibernate.boot.model.naming.Identifier, org.hibernate.boot.model.relational.QualifiedTableName, org.hibernate.engine.jdbc.env.spi.IdentifierHelper, org.hibernate.tool.schema.extract.spi.ColumnInformation, .ForeignKeyInformation, .IndexInformation, .InformationExtractor, .PrimaryKeyInformation, .TableInformation

Provides access to information about existing schema objects (tables, sequences etc) of existing database.
Authors
Christoph Sturm, Max Rydahl Andersen, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private Map<Identifier, ColumnInformation>
private final String
private final InformationExtractor
private Map<Identifier, ForeignKeyInformation>
private final IdentifierHelper
private Map<Identifier, IndexInformation>
private final boolean
private PrimaryKeyInformation
private final QualifiedTableName
private boolean

Constructor Summary

AccessConstructor and Description
public
TableInformationImpl(InformationExtractor extractor, IdentifierHelper identifierHelper, QualifiedTableName tableName, boolean physicalTable, String comment)

Method Summary

Modifier and TypeMethod and Description
public void
protected Map<Identifier, ForeignKeyInformation>
public ColumnInformation
getColumn(Identifier
The column identifier (simple name)
columnIdentifier
)

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getColumn.

Retrieve the named ColumnInformation
public String
getComment()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getComment.

Get the comments/remarks defined for the table.
public ForeignKeyInformation
getForeignKey(Identifier
The foreign key identifier (simple name)
fkIdentifier
)

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getForeignKey.

Retrieve the named ForeignKeyInformation
public Iterable<ForeignKeyInformation>
getForeignKeys()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getForeignKeys.

Obtain an iterable over all the table's defined foreign keys.
public IndexInformation
getIndex(Identifier
The index identifier (simple name)
indexName
)

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getIndex.

Retrieve the named IndexInformation
public Iterable<IndexInformation>
getIndexes()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getIndexes.

Obtain an iterable over all the table's defined indexes.
public QualifiedTableName
getName()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getName.

Get the qualified name of the table.
public PrimaryKeyInformation
getPrimaryKey()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getPrimaryKey.

Retrieve information about the table's primary key, if one is defined (aka, may return null).
protected Map<Identifier, IndexInformation>
public boolean
isPhysicalTable()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.isPhysicalTable.

Does this information describe a physical table as opposed to a view, etc?
public String
toString()

Overrides java.lang.Object.toString.

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

Field Detail

columnsback to summary
private Map<Identifier, ColumnInformation> columns
commentback to summary
private final String comment
extractorback to summary
private final InformationExtractor extractor
foreignKeysback to summary
private Map<Identifier, ForeignKeyInformation> foreignKeys
identifierHelperback to summary
private final IdentifierHelper identifierHelper
indexesback to summary
private Map<Identifier, IndexInformation> indexes
physicalTableback to summary
private final boolean physicalTable
primaryKeyback to summary
private PrimaryKeyInformation primaryKey
tableNameback to summary
private final QualifiedTableName tableName
wasPrimaryKeyLoadedback to summary
private boolean wasPrimaryKeyLoaded

Constructor Detail

TableInformationImplback to summary
public TableInformationImpl(InformationExtractor extractor, IdentifierHelper identifierHelper, QualifiedTableName tableName, boolean physicalTable, String comment)

Method Detail

addColumnback to summary
public void addColumn(ColumnInformation columnIdentifier)

Implements org.hibernate.tool.schema.extract.spi.TableInformation.addColumn.

Annotations
@Override
foreignKeysback to summary
protected Map<Identifier, ForeignKeyInformation> foreignKeys()
getColumnback to summary
public ColumnInformation getColumn(Identifier columnIdentifier)

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getColumn.

Doc from org.hibernate.tool.schema.extract.spi.TableInformation.getColumn.

Retrieve the named ColumnInformation

Parameters
columnIdentifier:Identifier

The column identifier (simple name)

Returns:ColumnInformation

The matching column information. May return null

Annotations
@Override
getCommentback to summary
public String getComment()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getComment.

Doc from org.hibernate.tool.schema.extract.spi.TableInformation.getComment.

Get the comments/remarks defined for the table.

Returns:String

The table comments

Annotations
@Override
getForeignKeyback to summary
public ForeignKeyInformation getForeignKey(Identifier fkIdentifier)

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getForeignKey.

Doc from org.hibernate.tool.schema.extract.spi.TableInformation.getForeignKey.

Retrieve the named ForeignKeyInformation

Parameters
fkIdentifier:Identifier

The foreign key identifier (simple name)

Returns:ForeignKeyInformation

The matching foreign key information. May return null

Annotations
@Override
getForeignKeysback to summary
public Iterable<ForeignKeyInformation> getForeignKeys()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getForeignKeys.

Doc from org.hibernate.tool.schema.extract.spi.TableInformation.getForeignKeys.

Obtain an iterable over all the table's defined foreign keys.

Returns:Iterable<ForeignKeyInformation>

The iterable.

Annotations
@Override
getIndexback to summary
public IndexInformation getIndex(Identifier indexName)

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getIndex.

Doc from org.hibernate.tool.schema.extract.spi.TableInformation.getIndex.

Retrieve the named IndexInformation

Parameters
indexName:Identifier

The index identifier (simple name)

Returns:IndexInformation

The matching index information. May return null

Annotations
@Override
getIndexesback to summary
public Iterable<IndexInformation> getIndexes()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getIndexes.

Doc from org.hibernate.tool.schema.extract.spi.TableInformation.getIndexes.

Obtain an iterable over all the table's defined indexes.

Returns:Iterable<IndexInformation>

The iterable.

Annotations
@Override
getNameback to summary
public QualifiedTableName getName()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getName.

Doc from org.hibernate.tool.schema.extract.spi.TableInformation.getName.

Get the qualified name of the table.

Returns:QualifiedTableName

The qualified table name

Annotations
@Override
getPrimaryKeyback to summary
public PrimaryKeyInformation getPrimaryKey()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.getPrimaryKey.

Doc from org.hibernate.tool.schema.extract.spi.TableInformation.getPrimaryKey.

Retrieve information about the table's primary key, if one is defined (aka, may return null).

Returns:PrimaryKeyInformation

The primary key information, or null if the table did not define a primary key.

Annotations
@Override
indexesback to summary
protected Map<Identifier, IndexInformation> indexes()
isPhysicalTableback to summary
public boolean isPhysicalTable()

Implements org.hibernate.tool.schema.extract.spi.TableInformation.isPhysicalTable.

Doc from org.hibernate.tool.schema.extract.spi.TableInformation.isPhysicalTable.

Does this information describe a physical table as opposed to a view, etc?

Returns:boolean

true if this is a physical table; false otherwise.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override