org.apache.turbine.torque.engine.database.model
Class ForeignKey

java.lang.Object
  |
  +--org.apache.turbine.torque.engine.database.model.ForeignKey

public class ForeignKey
extends java.lang.Object

A Class for information about foreign keys of a table

Version:
$Id: ForeignKey.java,v 1.4.4.7 2001/06/01 01:34:50 jvanzyl Exp $
Author:
Fedor

Constructor Summary
ForeignKey()
          Default Constructor
 
Method Summary
 void addReference(org.xml.sax.Attributes attrib)
          adds a new reference entry to the foreign key
 void addReference(java.lang.String local, java.lang.String foreign)
          adds a new reference entry to the foreign key
 java.lang.String getForeignColumnNames()
          Return a comma delimited string of foreign column names
 java.util.List getForeignColumns()
          Return the vector of local columns.
 java.util.Hashtable getForeignLocalMapping()
          Utility method to get local column to foreign column mapping for this foreign key.
 java.lang.String getForeignTableName()
          Get the foreignTableName of the FK
 java.lang.String getLocalColumnNames()
          Return a comma delimited string of local column names
 java.util.List getLocalColumns()
          Return the vector of local columns.
 java.util.Hashtable getLocalForeignMapping()
          Utility method to get local column to foreign column mapping for this foreign key.
 Table getTable()
          Get the parent Table of the foreign key
 java.lang.String getTableName()
          Returns the Name of the table the foreign key is in
 void loadFromXML(org.xml.sax.Attributes attrib)
          Imports foreign key from an XML specification
 void setForeignTableName(java.lang.String tableName)
          Set the foreignTableName of the FK
 void setTable(Table parent)
          Set the parent Table of the foreign key
 java.lang.String toString()
          String representation of the foreign key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForeignKey

public ForeignKey()
Default Constructor

Method Detail

loadFromXML

public void loadFromXML(org.xml.sax.Attributes attrib)
Imports foreign key from an XML specification


getForeignTableName

public java.lang.String getForeignTableName()
Get the foreignTableName of the FK


setForeignTableName

public void setForeignTableName(java.lang.String tableName)
Set the foreignTableName of the FK


setTable

public void setTable(Table parent)
Set the parent Table of the foreign key


getTable

public Table getTable()
Get the parent Table of the foreign key


getTableName

public java.lang.String getTableName()
Returns the Name of the table the foreign key is in


addReference

public void addReference(org.xml.sax.Attributes attrib)
adds a new reference entry to the foreign key


addReference

public void addReference(java.lang.String local,
                         java.lang.String foreign)
adds a new reference entry to the foreign key


getLocalColumnNames

public java.lang.String getLocalColumnNames()
Return a comma delimited string of local column names


getForeignColumnNames

public java.lang.String getForeignColumnNames()
Return a comma delimited string of foreign column names


getLocalColumns

public java.util.List getLocalColumns()
Return the vector of local columns. You should not edit this vector.


getLocalForeignMapping

public java.util.Hashtable getLocalForeignMapping()
Utility method to get local column to foreign column mapping for this foreign key.


getForeignColumns

public java.util.List getForeignColumns()
Return the vector of local columns. You should not edit this vector.


getForeignLocalMapping

public java.util.Hashtable getForeignLocalMapping()
Utility method to get local column to foreign column mapping for this foreign key.


toString

public java.lang.String toString()
String representation of the foreign key. This is an xml representation.

Overrides:
toString in class java.lang.Object


Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.