schemacrawler.schema
Interface Table

All Superinterfaces:
java.lang.Comparable<NamedObject>, DatabaseObject, NamedObject, java.io.Serializable
All Known Subinterfaces:
View

public interface Table
extends DatabaseObject

Represents a table in the database.

Author:
Sualeh Fatehi

Method Summary
 CheckConstraint[] getCheckConstraints()
          Gets the list of check constraints.
 Column getColumn(java.lang.String name)
          Gets a column by name.
 Column[] getColumns()
          Gets the list of columns in ordinal order.
 java.lang.String getColumnsListAsString()
          Gets a comma-separated list of columns.
 ForeignKey getForeignKey(java.lang.String name)
          Gets a foreign key by name.
 ForeignKey[] getForeignKeys()
          Gets the list of foreign keys.
 ForeignKey[] getForeignKeys(TableAssociationType tableAssociationType)
          Gets the list of foreign keys.
 Index getIndex(java.lang.String name)
          Gets an index by name.
 Index[] getIndices()
          Gets the list of indices.
 PrimaryKey getPrimaryKey()
          Gets the primary key.
 Privilege getPrivilege(java.lang.String name)
          Gets a privilege by name.
 Privilege[] getPrivileges()
          Gets the list of privileges.
 Table[] getRelatedTables(TableRelationshipType tableRelationshipType)
          Gets the tables related to this one, based on the specified relationship type.
 Trigger getTrigger(java.lang.String name)
          Gets a trigger by name.
 Trigger[] getTriggers()
          Gets the list of triggers.
 TableType getType()
          Gets the table type.
 ColumnMap[] getWeakAssociations()
          Weak column associations that are derived by SchemaCrawler from the column names.
 ColumnMap[] getWeakAssociations(TableAssociationType tableAssociationType)
          Weak column associations that are derived by SchemaCrawler from the column names.
 
Methods inherited from interface schemacrawler.schema.DatabaseObject
getSchema
 
Methods inherited from interface schemacrawler.schema.NamedObject
getAttribute, getAttributes, getFullName, getName, getRemarks, setAttribute
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getCheckConstraints

CheckConstraint[] getCheckConstraints()
Gets the list of check constraints.

Returns:
Check constraints for the table

getColumn

Column getColumn(java.lang.String name)
Gets a column by name.

Parameters:
name - Name
Returns:
Column.

getColumns

Column[] getColumns()
Gets the list of columns in ordinal order.

Returns:
Columns of the table

getColumnsListAsString

java.lang.String getColumnsListAsString()
Gets a comma-separated list of columns.

Returns:
Comma-separated list of columns

getForeignKey

ForeignKey getForeignKey(java.lang.String name)
Gets a foreign key by name.

Parameters:
name - Name
Returns:
ForeignKey.

getForeignKeys

ForeignKey[] getForeignKeys()
Gets the list of foreign keys. Same as calling getForeignKeys(TableAssociationType.all).

Returns:
Foreign keys of the table.

getForeignKeys

ForeignKey[] getForeignKeys(TableAssociationType tableAssociationType)
Gets the list of foreign keys.

Parameters:
tableAssociationType - Specifies what kind of foreign keys are to be returned, one of
  • all
  • exported, that is, only those whose primary key is referenced in another table
  • imported, that is, only those that reference a primary key another table
Returns:
Foreign keys of the table.

getIndex

Index getIndex(java.lang.String name)
Gets an index by name.

Parameters:
name - Name
Returns:
Index.

getIndices

Index[] getIndices()
Gets the list of indices.

Returns:
Indices of the table.

getPrimaryKey

PrimaryKey getPrimaryKey()
Gets the primary key.

Returns:
Primary key

getPrivilege

Privilege getPrivilege(java.lang.String name)
Gets a privilege by name.

Parameters:
name - Name
Returns:
Privilege.

getPrivileges

Privilege[] getPrivileges()
Gets the list of privileges.

Returns:
Privileges for the table.

getRelatedTables

Table[] getRelatedTables(TableRelationshipType tableRelationshipType)
Gets the tables related to this one, based on the specified relationship type. Child tables are those who have a foreign key from this table. Parent tables are those to which this table has a foreign key.

Parameters:
tableRelationshipType - Table relationship type
Returns:
Related tables.

getTrigger

Trigger getTrigger(java.lang.String name)
Gets a trigger by name.

Parameters:
name - Name
Returns:
Trigger.

getTriggers

Trigger[] getTriggers()
Gets the list of triggers.

Returns:
Triggers for the table.

getType

TableType getType()
Gets the table type.

Returns:
Table type.

getWeakAssociations

ColumnMap[] getWeakAssociations()
Weak column associations that are derived by SchemaCrawler from the column names. Same as calling getWeakAssociations(TableAssociationType.all).

Returns:
Weak associations for the table

getWeakAssociations

ColumnMap[] getWeakAssociations(TableAssociationType tableAssociationType)
Weak column associations that are derived by SchemaCrawler from the column names.

Parameters:
tableAssociationType - Specifies what kind of weak associations are to be returned, one of
  • all
  • exported, that is, only those whose primary key is referenced in another table
  • imported, that is, only those that reference a primary key another table
Returns:
Weak associations for the table


Copyright © 2003-2009 Sualeh Fatehi. All Rights Reserved.