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:
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:
2.2 (Sep 9, 2005)
Version:
$Revision: 826 $ $Date: 2008-10-05 19:42:03 +0200 (Sun, 05 Oct 2008) $
Author:
Felipe Leme (dbunit@felipeal.net), Last changed by: $Author: gommma $

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

Constructor Detail

ForeignKeyRelationshipEdge

public ForeignKeyRelationshipEdge(String tableFrom,
                                  String tableTo,
                                  String fkColumn,
                                  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 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 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 String toString()
Overrides:
toString in class Edge

hashCode

public int hashCode()
Overrides:
hashCode in class Edge

equals

public boolean equals(Object obj)
Overrides:
equals in class Edge


Copyright © 2002-2012. All Rights Reserved.