planetj.database
Class ForeignKey

java.lang.Object
  extended byplanetj.database.ForeignKey
All Implemented Interfaces:
ITableDependency, java.io.Serializable

public class ForeignKey
extends java.lang.Object
implements java.io.Serializable, ITableDependency

Represents a foreign key relationship between two tables

See Also:
Serialized Form

Constructor Summary
ForeignKey()
           
 
Method Summary
 java.util.List getDependentTables()
          Gets a List containing all of the tables in this ITableDependency which depend on the primary table
 java.util.List getForeignKeyColumnNames()
          Gets a List containing the names of columns in the foreign key table which reference columns in the primary key table.
 Table getForeignKeyTable()
          Gets the foreign key table whose columns have a foreign key reference to columns in another table
 java.util.List getPrimaryColumnNames()
          Gets a List containing the names of columns in the primary table which are referenced by columns in the foreign key table.
 Table getPrimaryTable()
          Gets the primary table whose columns are referenced as foreign keys by another table
protected  void setForeignKeyColumnNames(java.util.List colNames)
          Sets a List containing the names of columns in the foreign key table which reference columns in the primary key table.
protected  void setForeignKeyTable(Table t)
          Sets the foreign key table whose columns have a foreign key reference to columns in another table
protected  void setPrimaryColumnNames(java.util.List colNames)
          Sets a List containing the names of columns in the primary table which are referenced by columns in the foreign key table.
protected  void setPrimaryTable(Table t)
          Sets the primary table whose columns are referenced as foreign keys by another table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForeignKey

public ForeignKey()
Method Detail

getDependentTables

public java.util.List getDependentTables()
Gets a List containing all of the tables in this ITableDependency which depend on the primary table

Specified by:
getDependentTables in interface ITableDependency

getForeignKeyColumnNames

public java.util.List getForeignKeyColumnNames()
Gets a List containing the names of columns in the foreign key table which reference columns in the primary key table. The ordering matches the order of the columns returned by the getPrimaryColumnNames() method


getForeignKeyTable

public Table getForeignKeyTable()
Gets the foreign key table whose columns have a foreign key reference to columns in another table


getPrimaryColumnNames

public java.util.List getPrimaryColumnNames()
Gets a List containing the names of columns in the primary table which are referenced by columns in the foreign key table. The ordering matches the order of the columns returned by the getForeignKeyColumnNames() method


getPrimaryTable

public Table getPrimaryTable()
Gets the primary table whose columns are referenced as foreign keys by another table

Specified by:
getPrimaryTable in interface ITableDependency

setForeignKeyColumnNames

protected void setForeignKeyColumnNames(java.util.List colNames)
Sets a List containing the names of columns in the foreign key table which reference columns in the primary key table. The ordering matches the order of the columns returned by the getPrimaryColumnNames() method


setForeignKeyTable

protected void setForeignKeyTable(Table t)
Sets the foreign key table whose columns have a foreign key reference to columns in another table


setPrimaryColumnNames

protected void setPrimaryColumnNames(java.util.List colNames)
Sets a List containing the names of columns in the primary table which are referenced by columns in the foreign key table. The ordering matches the order of the columns returned by the getForeignKeyColumnNames() method


setPrimaryTable

protected void setPrimaryTable(Table t)
Sets the primary table whose columns are referenced as foreign keys by another table