public class TableInformationImpl extends Object implements TableInformation
Constructor and Description |
---|
TableInformationImpl(InformationExtractor extractor,
QualifiedTableName tableName,
boolean physicalTable,
String comment) |
Modifier and Type | Method and Description |
---|---|
protected Map<Identifier,ForeignKeyInformation> |
foreignKeys() |
ColumnInformation |
getColumn(Identifier columnIdentifier)
Retrieve the named ColumnInformation
|
String |
getComment()
Get the comments/remarks defined for the table.
|
ForeignKeyInformation |
getForeignKey(Identifier fkIdentifier)
Retrieve the named ForeignKeyInformation
|
Iterable<ForeignKeyInformation> |
getForeignKeys()
Obtain an iterable over all the table's defined foreign keys.
|
IndexInformation |
getIndex(Identifier indexName)
Retrieve the named IndexInformation
|
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 Map<Identifier,IndexInformation> |
indexes() |
boolean |
isPhysicalTable()
Does this information describe a physical table as opposed to a view, etc?
|
String |
toString() |
public TableInformationImpl(InformationExtractor extractor, QualifiedTableName tableName, boolean physicalTable, String comment)
public QualifiedTableName getName()
TableInformation
getName
in interface TableInformation
public boolean isPhysicalTable()
TableInformation
isPhysicalTable
in interface TableInformation
true
if this is a physical table; false
otherwise.public String getComment()
TableInformation
getComment
in interface TableInformation
public ColumnInformation getColumn(Identifier columnIdentifier)
TableInformation
getColumn
in interface TableInformation
columnIdentifier
- The column identifier (simple name)null
public PrimaryKeyInformation getPrimaryKey()
TableInformation
null
).getPrimaryKey
in interface TableInformation
null
if the table did not define a primary key.public Iterable<ForeignKeyInformation> getForeignKeys()
TableInformation
getForeignKeys
in interface TableInformation
protected Map<Identifier,ForeignKeyInformation> foreignKeys()
public ForeignKeyInformation getForeignKey(Identifier fkIdentifier)
TableInformation
getForeignKey
in interface TableInformation
fkIdentifier
- The foreign key identifier (simple name)null
public Iterable<IndexInformation> getIndexes()
TableInformation
getIndexes
in interface TableInformation
protected Map<Identifier,IndexInformation> indexes()
public IndexInformation getIndex(Identifier indexName)
TableInformation
getIndex
in interface TableInformation
indexName
- The index identifier (simple name)null
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.