org.dbunit.database.search
Class ForeignKeyRelationshipEdge

java.lang.Object
  extended by org.dbunit.util.search.Edge
      extended by org.dbunit.database.search.ForeignKeyRelationshipEdge
All Implemented Interfaces:
java.lang.Comparable, IEdge

public class ForeignKeyRelationshipEdge
extends Edge

Implementation of an edge representing a foreign key (FK) relationship between two tables.
The from node is the table which have the FK, while the to node is the table with the PK. In other words, the edge A->B means FK(A) = PK(B).
NOTE: only single-column PKs are supported at this moment

Since:
Sep 9, 2005
Version:
$Revision: 769 $
Author:
Felipe Leme (dbunit@felipeal.net)

Constructor Summary
ForeignKeyRelationshipEdge(java.lang.String tableFrom, java.lang.String tableTo, java.lang.String fkColumn, java.lang.String pkColumn)
          Creates an edge representing a FK.
 
Method Summary
 java.lang.String getFKColumn()
          Gets the name of the foreign key column in the relationship.
 java.lang.String getPKColumn()
          Gets the name of the primary key column in the relationship.
 java.lang.String toString()
           
 
Methods inherited from class org.dbunit.util.search.Edge
compareTo, equals, getFrom, getTo, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForeignKeyRelationshipEdge

public ForeignKeyRelationshipEdge(java.lang.String tableFrom,
                                  java.lang.String tableTo,
                                  java.lang.String fkColumn,
                                  java.lang.String pkColumn)
Creates an edge representing a FK.

Parameters:
tableFrom - table that has the FK
tableTo - table that has the PK
fkColumn - name of the FK column on tableFrom
pkColumn - name of the PK column on tableTo
Method Detail

getFKColumn

public java.lang.String getFKColumn()
Gets the name of the foreign key column in the relationship.

Returns:
name of the foreign key column in the relationship.

getPKColumn

public java.lang.String getPKColumn()
Gets the name of the primary key column in the relationship.

Returns:
name of the primary key column in the relationship.

toString

public java.lang.String toString()
Overrides:
toString in class Edge


Copyright © 2002-2008. All Rights Reserved.