public class TableInformationImpl extends java.lang.Object implements TableInformation
| Constructor and Description |
|---|
TableInformationImpl(InformationExtractor extractor,
IdentifierHelper identifierHelper,
QualifiedTableName tableName,
boolean physicalTable,
java.lang.String comment) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(ColumnInformation columnIdentifier) |
protected java.util.Map<Identifier,ForeignKeyInformation> |
foreignKeys() |
ColumnInformation |
getColumn(Identifier columnIdentifier)
Retrieve the named ColumnInformation
|
java.lang.String |
getComment()
Get the comments/remarks defined for the table.
|
ForeignKeyInformation |
getForeignKey(Identifier fkIdentifier)
Retrieve the named ForeignKeyInformation
|
java.lang.Iterable<ForeignKeyInformation> |
getForeignKeys()
Obtain an iterable over all the table's defined foreign keys.
|
IndexInformation |
getIndex(Identifier indexName)
Retrieve the named IndexInformation
|
java.lang.Iterable<IndexInformation> |
getIndexes()
Obtain an iterable over all the table's defined indexes.
|
QualifiedTableName |
getName()
Get the qualified name of the table.
|
PrimaryKeyInformation |
getPrimaryKey()
Retrieve information about the table's primary key, if one is defined (aka, may return
null). |
protected java.util.Map<Identifier,IndexInformation> |
indexes() |
boolean |
isPhysicalTable()
Does this information describe a physical table as opposed to a view, etc?
|
java.lang.String |
toString() |
public TableInformationImpl(InformationExtractor extractor, IdentifierHelper identifierHelper, QualifiedTableName tableName, boolean physicalTable, java.lang.String comment)
public QualifiedTableName getName()
TableInformationgetName in interface TableInformationpublic boolean isPhysicalTable()
TableInformationisPhysicalTable in interface TableInformationtrue if this is a physical table; false otherwise.public java.lang.String getComment()
TableInformationgetComment in interface TableInformationpublic ColumnInformation getColumn(Identifier columnIdentifier)
TableInformationgetColumn in interface TableInformationcolumnIdentifier - The column identifier (simple name)nullpublic PrimaryKeyInformation getPrimaryKey()
TableInformationnull).getPrimaryKey in interface TableInformationnull if the table did not define a primary key.public java.lang.Iterable<ForeignKeyInformation> getForeignKeys()
TableInformationgetForeignKeys in interface TableInformationprotected java.util.Map<Identifier,ForeignKeyInformation> foreignKeys()
public ForeignKeyInformation getForeignKey(Identifier fkIdentifier)
TableInformationgetForeignKey in interface TableInformationfkIdentifier - The foreign key identifier (simple name)nullpublic java.lang.Iterable<IndexInformation> getIndexes()
TableInformationgetIndexes in interface TableInformationprotected java.util.Map<Identifier,IndexInformation> indexes()
public void addColumn(ColumnInformation columnIdentifier)
addColumn in interface TableInformationpublic IndexInformation getIndex(Identifier indexName)
TableInformationgetIndex in interface TableInformationindexName - The index identifier (simple name)nullpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.