Package org.dbunit.database.search
Class ForeignKeyRelationshipEdge
java.lang.Object
org.dbunit.util.search.Edge
org.dbunit.database.search.ForeignKeyRelationshipEdge
- All Implemented Interfaces:
Comparable<Object>,IEdge
Implementation of an edge representing a foreign key (FK) relationship between two
tables.
The
NOTE: only single-column PKs are supported at this moment
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$ $Date$
- Author:
- Felipe Leme (dbunit@felipeal.net), Last changed by: $Author$
-
Constructor Summary
ConstructorsConstructorDescriptionForeignKeyRelationshipEdge(String tableFrom, String tableTo, String fkColumn, String pkColumn) Creates an edge representing a FK. -
Method Summary
Modifier and TypeMethodDescriptionintCompares this edge to the given one using thenodes first.Edge.getFrom()booleanGets the name of the foreign key column in the relationship.Gets the name of the primary key column in the relationship.inthashCode()toString()
-
Constructor Details
-
ForeignKeyRelationshipEdge
public ForeignKeyRelationshipEdge(String tableFrom, String tableTo, String fkColumn, String pkColumn) Creates an edge representing a FK.- Parameters:
tableFrom- table that has the FKtableTo- table that has the PKfkColumn- name of the FK column on tableFrompkColumn- name of the PK column on tableTo
-
-
Method Details
-
getFKColumn
Gets the name of the foreign key column in the relationship.- Returns:
- name of the foreign key column in the relationship.
-
getPKColumn
Gets the name of the primary key column in the relationship.- Returns:
- name of the primary key column in the relationship.
-
toString
-
hashCode
public int hashCode() -
equals
-
compareTo
Description copied from class:EdgeCompares this edge to the given one using thenodes first. If those are equal theEdge.getFrom()is used for comparison.Edge.getTo()}- Specified by:
compareToin interfaceComparable<Object>- Overrides:
compareToin classEdge- See Also:
-