org.jboss.dna.common.jdbc.model.api
Interface Table

All Superinterfaces:
CoreMetaData, DatabaseNamedObject, SchemaObject, Serializable
All Known Implementing Classes:
TableBean

public interface Table
extends SchemaObject

Provides all core database table specific metadata.

Author:
Sergiy Litsenko

Method Summary
 void addBestRowIdentifier(BestRowIdentifier bestRowIdentifier)
          Adds BestRowIdentifier
 void addColumn(TableColumn column)
          Adds TableColumn
 void addForeignKey(ForeignKey foreignKey)
          adds ForeignKey
 void addIndex(Index index)
          adds Index
 void addPrivilege(Privilege privilege)
          Adds table priviledge
 void addVersionColumn(TableColumn tableColumn)
          adds version column
 void deleteBestRowIdentifier(BestRowIdentifier bestRowIdentifier)
          deletes BestRowIdentifier
 void deleteColumn(TableColumn column)
          deletes TableColumn
 void deleteForeignKey(ForeignKey foreignKey)
          deletes ForeignKey
 void deleteIndex(Index index)
          deletes Index
 void deletePrivilege(Privilege privilege)
          Deletes table priviledge
 void deleteVersionColumn(TableColumn tableColumn)
          deletes version column
 BestRowIdentifier findBestRowIdentifierByScopeType(BestRowIdentifierScopeType scopeType)
          Searches the BestRowIdentifier by scope
 TableColumn findColumnByName(String columnName)
          Returns table column for specified column name or null
 ForeignKey findForeignKeyByName(String fkName)
          Returns table foreign key for specified name or null
 Index findIndexByName(String indexName)
          Returns table index for specified name or null
 Privilege findPriviledgeByName(String priviledgeName)
          Searches priviledge by name
 TableColumn findVersionColumnByName(String columnName)
          Returns table version column for specified name or null
 Set<BestRowIdentifier> getBestRowIdentifiers()
          Retrieves a set of descriptions of a table's optimal set of columns that uniquely identifies a row in temporary scopes.
 Set<TableColumn> getColumns()
          Gets a set of table columns
 Set<ForeignKey> getForeignKeys()
          Gets a set of table foreign key columns
 Set<Index> getIndexes()
          Gets a set of table indexes
 PrimaryKey getPrimaryKey()
          Gets a table primary key
 Set<Privilege> getPrivileges()
          Gets table privileges.
 String getReferenceGeneration()
          specifies how values in getSelfReferencingColumnName () are created.
 String getSelfReferencingColumnName()
          Gets name of the designated "identifier" column of a typed table (may be null)
 Table getSuperTable()
          Retrieves a description of the table hierarchies defined in a particular schema in this database.
 TableType getTableType()
          Returns type of table such as: "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
 Catalog getTypeCatalog()
          Gets type catalog
 String getTypeName()
          Gets type name
 Schema getTypeSchema()
          Gets type schema
 Set<TableColumn> getVersionColumns()
          Gets a set of table version columns
 void setPrimaryKey(PrimaryKey primaryKey)
          Sets a table primary key
 void setReferenceGeneration(String referenceGeneration)
          specifies how values in getSelfReferencingColumnName () are created.
 void setSelfReferencingColumnName(String selfReferencingColumnName)
          Sets name of the designated "identifier" column of a typed table (may be null)
 void setSuperTable(Table superTable)
          Sets a description of the table hierarchies defined in a particular schema in this database.
 void setTableType(TableType tableType)
          Sets type of table such as: "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
 void setTypeCatalog(Catalog typeCatalog)
          Sets type catalog
 void setTypeName(String typeName)
          Sets type name
 void setTypeSchema(Schema typeSchema)
          Sets type schema
 
Methods inherited from interface org.jboss.dna.common.jdbc.model.api.SchemaObject
getCatalog, getSchema, setCatalog, setSchema
 
Methods inherited from interface org.jboss.dna.common.jdbc.model.api.DatabaseNamedObject
addExtraProperty, deleteExtraProperty, getExtraProperties, getExtraProperty, getName, getRemarks, setName, setRemarks
 

Method Detail

getTableType

TableType getTableType()
Returns type of table such as: "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".

Returns:
type of table.

setTableType

void setTableType(TableType tableType)
Sets type of table such as: "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".

Parameters:
tableType - the type of table.

getTypeCatalog

Catalog getTypeCatalog()
Gets type catalog

Returns:
types catalog (may be null)

setTypeCatalog

void setTypeCatalog(Catalog typeCatalog)
Sets type catalog

Parameters:
typeCatalog - the types catalog (may be null)

getTypeSchema

Schema getTypeSchema()
Gets type schema

Returns:
types schema (may be null)

setTypeSchema

void setTypeSchema(Schema typeSchema)
Sets type schema

Parameters:
typeSchema - the types schema (may be null)

getTypeName

String getTypeName()
Gets type name

Returns:
types name (may be null)

setTypeName

void setTypeName(String typeName)
Sets type name

Parameters:
typeName - types name (may be null)

getSelfReferencingColumnName

String getSelfReferencingColumnName()
Gets name of the designated "identifier" column of a typed table (may be null)

Returns:
name of the designated "identifier" column of a typed table (may be null)

setSelfReferencingColumnName

void setSelfReferencingColumnName(String selfReferencingColumnName)
Sets name of the designated "identifier" column of a typed table (may be null)

Parameters:
selfReferencingColumnName - the name of the designated "identifier" column of a typed table (may be null)

getReferenceGeneration

String getReferenceGeneration()
specifies how values in getSelfReferencingColumnName () are created. Values are "SYSTEM", "USER", "DERIVED". (may be null)

Returns:
how values in getSelfReferencingColumnName () are created.

setReferenceGeneration

void setReferenceGeneration(String referenceGeneration)
specifies how values in getSelfReferencingColumnName () are created. Values are "SYSTEM", "USER", "DERIVED". (may be null)

Parameters:
referenceGeneration - how values in getSelfReferencingColumnName () are created.

getColumns

Set<TableColumn> getColumns()
Gets a set of table columns

Returns:
a set of table columns.

addColumn

void addColumn(TableColumn column)
Adds TableColumn

Parameters:
column - the TableColumn

deleteColumn

void deleteColumn(TableColumn column)
deletes TableColumn

Parameters:
column - the TableColumn

findColumnByName

TableColumn findColumnByName(String columnName)
Returns table column for specified column name or null

Parameters:
columnName - the name of column
Returns:
table column for specified column name or null.

getPrimaryKey

PrimaryKey getPrimaryKey()
Gets a table primary key

Returns:
a table primary key.

setPrimaryKey

void setPrimaryKey(PrimaryKey primaryKey)
Sets a table primary key

Parameters:
primaryKey - the table primary key.

getForeignKeys

Set<ForeignKey> getForeignKeys()
Gets a set of table foreign key columns

Returns:
a set of table foreign keys.

addForeignKey

void addForeignKey(ForeignKey foreignKey)
adds ForeignKey

Parameters:
foreignKey - the ForeignKey

deleteForeignKey

void deleteForeignKey(ForeignKey foreignKey)
deletes ForeignKey

Parameters:
foreignKey - the ForeignKey

findForeignKeyByName

ForeignKey findForeignKeyByName(String fkName)
Returns table foreign key for specified name or null

Parameters:
fkName - the name of foreign key
Returns:
table foreign key for specified name or null.

getIndexes

Set<Index> getIndexes()
Gets a set of table indexes

Returns:
a set of table indexes.

addIndex

void addIndex(Index index)
adds Index

Parameters:
index - the Index

deleteIndex

void deleteIndex(Index index)
deletes Index

Parameters:
index - the Index

findIndexByName

Index findIndexByName(String indexName)
Returns table index for specified name or null

Parameters:
indexName - the name of index
Returns:
table index for specified name or null.

getVersionColumns

Set<TableColumn> getVersionColumns()
Gets a set of table version columns

Returns:
a set of table version columns.

addVersionColumn

void addVersionColumn(TableColumn tableColumn)
adds version column

Parameters:
tableColumn - the TableColumn

deleteVersionColumn

void deleteVersionColumn(TableColumn tableColumn)
deletes version column

Parameters:
tableColumn - the version column

findVersionColumnByName

TableColumn findVersionColumnByName(String columnName)
Returns table version column for specified name or null

Parameters:
columnName - the name of Version Column
Returns:
table Version Column for specified name or null.

getPrivileges

Set<Privilege> getPrivileges()
Gets table privileges.

Returns:
set of table privileges

addPrivilege

void addPrivilege(Privilege privilege)
Adds table priviledge

Parameters:
privilege - the table priviledge

deletePrivilege

void deletePrivilege(Privilege privilege)
Deletes table priviledge

Parameters:
privilege - the table priviledge

findPriviledgeByName

Privilege findPriviledgeByName(String priviledgeName)
Searches priviledge by name

Parameters:
priviledgeName - the priviledge name to search
Returns:
priviledge if found, otherwise return null

getBestRowIdentifiers

Set<BestRowIdentifier> getBestRowIdentifiers()
Retrieves a set of descriptions of a table's optimal set of columns that uniquely identifies a row in temporary scopes.

Returns:
BestRowIdentifier set that uniquely identifies a row in scopes.

addBestRowIdentifier

void addBestRowIdentifier(BestRowIdentifier bestRowIdentifier)
Adds BestRowIdentifier

Parameters:
bestRowIdentifier - the BestRowIdentifier

deleteBestRowIdentifier

void deleteBestRowIdentifier(BestRowIdentifier bestRowIdentifier)
deletes BestRowIdentifier

Parameters:
bestRowIdentifier - the BestRowIdentifier

findBestRowIdentifierByScopeType

BestRowIdentifier findBestRowIdentifierByScopeType(BestRowIdentifierScopeType scopeType)
Searches the BestRowIdentifier by scope

Parameters:
scopeType - the scope of best row identifier
Returns:
BestRowIdentifier if any

getSuperTable

Table getSuperTable()
Retrieves a description of the table hierarchies defined in a particular schema in this database. Only the immediate super type/ sub type relationship is modeled.

Returns:
super table for this table
Since:
1.4 (JDBC 3.0)

setSuperTable

void setSuperTable(Table superTable)
Sets a description of the table hierarchies defined in a particular schema in this database. Only the immediate super type/ sub type relationship is modeled.

Parameters:
superTable - the super table for this table
Since:
1.4 (JDBC 3.0)


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.