Interface TableInformation
-
- All Known Implementing Classes:
TableInformationImpl
public interface TableInformationProvides access to information about existing tables in the database
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddColumn(ColumnInformation columnIdentifier)ColumnInformationgetColumn(Identifier columnIdentifier)Retrieve the named ColumnInformationStringgetComment()Get the comments/remarks defined for the table.ForeignKeyInformationgetForeignKey(Identifier keyName)Retrieve the named ForeignKeyInformationIterable<ForeignKeyInformation>getForeignKeys()Obtain an iterable over all the table's defined foreign keys.IndexInformationgetIndex(Identifier indexName)Retrieve the named IndexInformationIterable<IndexInformation>getIndexes()Obtain an iterable over all the table's defined indexes.QualifiedTableNamegetName()Get the qualified name of the table.PrimaryKeyInformationgetPrimaryKey()Retrieve information about the table's primary key, if one is defined (aka, may returnnull).booleanisPhysicalTable()Does this information describe a physical table as opposed to a view, etc?
-
-
-
Method Detail
-
getName
QualifiedTableName getName()
Get the qualified name of the table.- Returns:
- The qualified table name
-
isPhysicalTable
boolean isPhysicalTable()
Does this information describe a physical table as opposed to a view, etc?- Returns:
trueif this is a physical table;falseotherwise.
-
getComment
String getComment()
Get the comments/remarks defined for the table.- Returns:
- The table comments
-
getColumn
ColumnInformation getColumn(Identifier columnIdentifier)
Retrieve the named ColumnInformation- Parameters:
columnIdentifier- The column identifier (simple name)- Returns:
- The matching column information. May return
null
-
getPrimaryKey
PrimaryKeyInformation getPrimaryKey()
Retrieve information about the table's primary key, if one is defined (aka, may returnnull).- Returns:
- The primary key information, or
nullif the table did not define a primary key.
-
getForeignKeys
Iterable<ForeignKeyInformation> getForeignKeys()
Obtain an iterable over all the table's defined foreign keys.- Returns:
- The iterable.
-
getForeignKey
ForeignKeyInformation getForeignKey(Identifier keyName)
Retrieve the named ForeignKeyInformation- Parameters:
keyName- The foreign key identifier (simple name)- Returns:
- The matching foreign key information. May return
null
-
getIndexes
Iterable<IndexInformation> getIndexes()
Obtain an iterable over all the table's defined indexes.- Returns:
- The iterable.
-
getIndex
IndexInformation getIndex(Identifier indexName)
Retrieve the named IndexInformation- Parameters:
indexName- The index identifier (simple name)- Returns:
- The matching index information. May return
null
-
addColumn
void addColumn(ColumnInformation columnIdentifier)
-
-