com.jgpruitt.datamodeler.core
Class ForeignKey

java.lang.Object
  extended by com.jgpruitt.datamodeler.core.ForeignKey

public class ForeignKey
extends java.lang.Object

Author:
John Pruitt

Field Summary
protected  java.lang.String comment
           
protected  ColumnSet constrainedColumns
           
protected  Table constrainedTable
           
protected  java.lang.String name
           
protected  ColumnSet referencedColumns
           
protected  Table referencedTable
           
 
Constructor Summary
ForeignKey(java.lang.String name)
          Constructor.
 
Method Summary
 java.lang.String getComment()
          Gets the comment describing this constraint.
 ColumnSet getConstrainedColumns()
          Gets the ColumnSet that contains the Columns that are being constrained by this constraint.
 Table getConstrainedTable()
          Gets the Table that is being constrained by this constraint.
 java.lang.String getName()
          Gets the name of the constraint.
 ColumnSet getReferencedColumns()
          Gets the ColumnSet that contains the Columns that are being referenced by this constraint.
 Table getReferencedTable()
          Gets the Table referenced by this constraint.
 void setComment(java.lang.String comment)
          Sets the comment describing this constraint for use in the data dictionary.
 void setConstrainedTable(Table constrainedTable)
          Sets the Table that is being constrained by this constraint
 void setReferencedTable(Table referencedTable)
          Sets the Table that is being referenced by this constraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name

constrainedTable

protected Table constrainedTable

constrainedColumns

protected final ColumnSet constrainedColumns

referencedTable

protected Table referencedTable

referencedColumns

protected final ColumnSet referencedColumns

comment

protected java.lang.String comment
Constructor Detail

ForeignKey

public ForeignKey(java.lang.String name)
Constructor.

Parameters:
name - The name of the foreign key constraint.
Method Detail

getName

public java.lang.String getName()
Gets the name of the constraint.

Returns:
The name of the constraint.

getConstrainedTable

public Table getConstrainedTable()
Gets the Table that is being constrained by this constraint.

Returns:
The constrained Table
See Also:
Table

setConstrainedTable

public void setConstrainedTable(Table constrainedTable)
Sets the Table that is being constrained by this constraint

Parameters:
constrainedTable - The constrained Table
See Also:
Table

getConstrainedColumns

public ColumnSet getConstrainedColumns()
Gets the ColumnSet that contains the Columns that are being constrained by this constraint.

Returns:
The ColumnSet containing the constrained Columns
See Also:
Column, ColumnSet

getReferencedTable

public Table getReferencedTable()
Gets the Table referenced by this constraint.

Returns:
The Table referenced by this constraint.
See Also:
Table

setReferencedTable

public void setReferencedTable(Table referencedTable)
Sets the Table that is being referenced by this constraint.

Parameters:
referencedTable - The Table that is being referenced by the constraint.
See Also:
Table

getReferencedColumns

public ColumnSet getReferencedColumns()
Gets the ColumnSet that contains the Columns that are being referenced by this constraint.

Returns:
The ColumnSet containing the referenced Columns
See Also:
Column, ColumnSet

getComment

public java.lang.String getComment()
Gets the comment describing this constraint.

Returns:
The comment.

setComment

public void setComment(java.lang.String comment)
Sets the comment describing this constraint for use in the data dictionary.

Parameters:
comment - The comment.