This is an old revision of the document!
====== Foreign Key ====== **''public class ForeignKey''** \\ **''implements Serializable''** Foreign Key describes a foreign key dependency between two relations from the common schema \\ ''(sourceRelation[sourceAttriutes] REFERENCES targetRealtion[targetKey])'' ===== Class Attributes ===== <code java> private long id; private Relation sourceRelation; private Relation targetRelation; private java.util.ArrayList<Integer> sourceAttributes; private boolean virtual; private boolean enforced; </code> ===== Class Constructor ===== ==== ForeignKey ==== <code java> public ForeignKey() </code> Default constructor ---- ==== ForeignKey ==== <code java> public ForeignKey (Relation sourceRelation, Relation targetRelation, java.util.ArrayList<Integer> sourceAttributes) </code> Constructor that store also values inside the class attributes. //Called by:// * it.unibz.inf.magik.web.SessionControl * it.unibz.inf.magik.db.DatabaseConnector * it.unibz.inf.magik.test.CycleDetectionTest * it.unibz.inf.magik.test.TestFK * it.unibz.inf.magik.test.TestFK2 * it.unibz.inf.magik.test.TestHardCaseFDCandFK * it.unibz.inf.magik.test.TestQueryGeneralization * it.unibz.inf.magik.test.TCQCReasonerFKandFD * it.unibz.inf.magik.test.TCQCReasonerTCSuggestions * it.unibz.inf.magik.test.TestQueryClass ===== Class Methods ===== ==== printHTML ==== <code java> public java.lang.String printHTML() </code> This method is used for create a compact view of a foreign key *Returns:* * foreign key adapted to the compact view ---- ==== getters and setters methods ====