com.metamatrix.common.jdbc.metadata
Class Table

java.lang.Object
  extended by com.metamatrix.common.jdbc.metadata.JDBCObject
      extended by com.metamatrix.common.jdbc.metadata.ColumnSet
          extended by com.metamatrix.common.jdbc.metadata.Table

public class Table
extends ColumnSet


Field Summary
static int NO_CARDINALITY
           
 
Fields inherited from class com.metamatrix.common.jdbc.metadata.JDBCObject
DELIMITER
 
Constructor Summary
Table()
           
Table(java.lang.String name)
           
Table(java.lang.String catalogName, java.lang.String schemaName, java.lang.String name)
           
 
Method Summary
 void add(Column object)
           
 void add(ForeignKey object)
           
 void add(Index object)
          Add a reference from this table to the specified Index.
 void add(UniqueKey object)
           
 void addAll(java.util.Collection tableEntities)
           
 void addPrivilege(java.lang.String privilege)
          Adds the specified privilege to this table.
 boolean contains(ForeignKey object)
           
 boolean contains(Index object)
           
 boolean contains(UniqueKey object)
           
 int getCardinality()
          This method obtains the cardinality (i.e., number of records as defined by the SQL standard) of the supplied Table instances.
 java.util.List getForeignKeys()
           
 java.util.List getIndexes()
           
 java.lang.String getRemarks()
           
 java.lang.String getType()
           
 java.util.List getUniqueKeys()
           
 boolean hasForeignKeys()
           
 boolean hasIndexes()
           
 boolean hasPrivilege(java.lang.String privilege)
           
 boolean hasPrivilege(java.lang.String privilege, boolean caseSensitive)
           
 boolean hasUniqueKeys()
           
 ForeignKey lookupForeignKey(ForeignKey matchingKey)
           
 ForeignKey lookupForeignKey(java.lang.String keyName)
           
 Index lookupIndex(java.lang.String indexName)
           
 UniqueKey lookupUniqueKey(java.lang.String keyName)
           
 UniqueKey lookupUniqueKey(UniqueKey matchingKey)
           
 void print(java.io.PrintStream stream)
           
 void print(java.io.PrintStream stream, java.lang.String lead)
           
 boolean remove(Column object)
           
 boolean remove(ForeignKey object)
           
 boolean remove(Index object)
           
 boolean remove(UniqueKey object)
           
 boolean removePrivilege(java.lang.String privilege)
           
 void setCardinality(int cardinality)
           
 void setRemarks(java.lang.String remarks)
           
 void setType(java.lang.String type)
           
 
Methods inherited from class com.metamatrix.common.jdbc.metadata.ColumnSet
addColumn, contains, getCatalogName, getColumnNames, getColumns, getFullName, getSchemaName, hasMatchingColumns, lookupColumn, removeColumn
 
Methods inherited from class com.metamatrix.common.jdbc.metadata.JDBCObject
addFullName, getFullName, getName, getOriginalNameNull, getOwner, getProperties, getProperty, hasName, hasOwner, hasProperties, isMarked, lookupJDBCObject, removeProperty, setMarked, setName, setOriginalNameNull, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_CARDINALITY

public static final int NO_CARDINALITY
See Also:
Constant Field Values
Constructor Detail

Table

public Table()

Table

public Table(java.lang.String name)

Table

public Table(java.lang.String catalogName,
             java.lang.String schemaName,
             java.lang.String name)
Method Detail

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

getRemarks

public java.lang.String getRemarks()

setRemarks

public void setRemarks(java.lang.String remarks)

addAll

public void addAll(java.util.Collection tableEntities)
Overrides:
addAll in class ColumnSet

add

public void add(Column object)
Overrides:
add in class ColumnSet

remove

public boolean remove(Column object)
Overrides:
remove in class ColumnSet

getUniqueKeys

public java.util.List getUniqueKeys()

add

public void add(UniqueKey object)

remove

public boolean remove(UniqueKey object)

contains

public boolean contains(UniqueKey object)

hasUniqueKeys

public boolean hasUniqueKeys()

getForeignKeys

public java.util.List getForeignKeys()

add

public void add(ForeignKey object)

remove

public boolean remove(ForeignKey object)

contains

public boolean contains(ForeignKey object)

hasForeignKeys

public boolean hasForeignKeys()

getIndexes

public java.util.List getIndexes()

add

public void add(Index object)
Add a reference from this table to the specified Index. Note that the Table is not considered to 'own' the Index.


remove

public boolean remove(Index object)

contains

public boolean contains(Index object)

hasIndexes

public boolean hasIndexes()

setCardinality

public void setCardinality(int cardinality)

getCardinality

public int getCardinality()
This method obtains the cardinality (i.e., number of records as defined by the SQL standard) of the supplied Table instances.

Returns:
the cardinality of this table if known or available from its associated indices, or NO_CARDINALITY if the cardinality is unknown.

addPrivilege

public void addPrivilege(java.lang.String privilege)
Adds the specified privilege to this table. The JDBC API specification uses the following as example privileges: "SELECT", "INSERT", "UPDATE", and "REFERENCES".


removePrivilege

public boolean removePrivilege(java.lang.String privilege)

hasPrivilege

public boolean hasPrivilege(java.lang.String privilege)

hasPrivilege

public boolean hasPrivilege(java.lang.String privilege,
                            boolean caseSensitive)

lookupIndex

public Index lookupIndex(java.lang.String indexName)

lookupUniqueKey

public UniqueKey lookupUniqueKey(java.lang.String keyName)

lookupUniqueKey

public UniqueKey lookupUniqueKey(UniqueKey matchingKey)

lookupForeignKey

public ForeignKey lookupForeignKey(java.lang.String keyName)

lookupForeignKey

public ForeignKey lookupForeignKey(ForeignKey matchingKey)

print

public void print(java.io.PrintStream stream)
Overrides:
print in class JDBCObject

print

public void print(java.io.PrintStream stream,
                  java.lang.String lead)
Overrides:
print in class JDBCObject


Copyright © 2009. All Rights Reserved.