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()
TableInformation
getName
in interface TableInformation
public boolean isPhysicalTable()
TableInformation
isPhysicalTable
in interface TableInformation
true
if this is a physical table; false
otherwise.public java.lang.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 java.lang.Iterable<ForeignKeyInformation> getForeignKeys()
TableInformation
getForeignKeys
in interface TableInformation
protected java.util.Map<Identifier,ForeignKeyInformation> foreignKeys()
public ForeignKeyInformation getForeignKey(Identifier fkIdentifier)
TableInformation
getForeignKey
in interface TableInformation
fkIdentifier
- The foreign key identifier (simple name)null
public java.lang.Iterable<IndexInformation> getIndexes()
TableInformation
getIndexes
in interface TableInformation
protected java.util.Map<Identifier,IndexInformation> indexes()
public void addColumn(ColumnInformation columnIdentifier)
addColumn
in interface TableInformation
public IndexInformation getIndex(Identifier indexName)
TableInformation
getIndex
in interface TableInformation
indexName
- The index identifier (simple name)null
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.