Interface TableInformation
-
- All Known Implementing Classes:
TableInformationImpl
public interface TableInformation
Provides access to information about existing tables in the database
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addColumn(ColumnInformation columnIdentifier)
ColumnInformation
getColumn(Identifier columnIdentifier)
Retrieve the named ColumnInformationString
getComment()
Get the comments/remarks defined for the table.ForeignKeyInformation
getForeignKey(Identifier keyName)
Retrieve the named ForeignKeyInformationIterable<ForeignKeyInformation>
getForeignKeys()
Obtain an iterable over all the table's defined foreign keys.IndexInformation
getIndex(Identifier indexName)
Retrieve the named IndexInformationIterable<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 returnnull
).boolean
isPhysicalTable()
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:
true
if this is a physical table;false
otherwise.
-
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
null
if 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)
-
-