01: package org.dbunit.database.search;
02:
03: import org.slf4j.Logger;
04: import org.slf4j.LoggerFactory;
05:
06: import org.dbunit.util.search.Edge;
07:
08: public class FKRelationshipEdge extends Edge {
09:
10: /**
11: * Logger for this class
12: */
13: private static final Logger logger = LoggerFactory
14: .getLogger(FKRelationshipEdge.class);
15:
16: // TODO: support multiple columns
17: private String fkColumn;
18: private String pkColumn;
19:
20: public FKRelationshipEdge(String tableFrom, String tableTo,
21: String fkColumn, String pkColumn) {
22: super (tableFrom, tableTo);
23: this .fkColumn = fkColumn;
24: this .pkColumn = pkColumn;
25: }
26:
27: public String getFKColumn() {
28: logger.debug("getFKColumn() - start");
29:
30: return fkColumn;
31: }
32:
33: public String getPKColumn() {
34: logger.debug("getPKColumn() - start");
35:
36: return pkColumn;
37: }
38:
39: public String toString() {
40: logger.debug("toString() - start");
41:
42: return getFrom() + "(" + getFKColumn() + ")->" + getTo() + "("
43: + getPKColumn() + ")";
44: }
45:
46: // TODO: hashcode and equals
47:
48: }
|