public class ForeignKey
implements Serializable
Foreign Key describes a foreign key dependency between two relations from the common schema
(sourceRelation[sourceAttriutes] REFERENCES targetRealtion[targetKey])
private long id; private Relation sourceRelation; private Relation targetRelation; private java.util.ArrayList<Integer> sourceAttributes; private boolean virtual; private boolean enforced;
public ForeignKey()
Default constructor
public ForeignKey (Relation sourceRelation, Relation targetRelation, java.util.ArrayList<Integer> sourceAttributes)
Constructor that store also values inside the class attributes.
Called by:
Parameters:
public java.lang.String printHTML()
This method is used for create a compact view of a foreign key (table[field] → table2[field]
)
Returns:
public Relation getSourceRelation() public void setSourceRelation(Relation sourceRelation) public Relation getTargetRelation() public void setTargetRelation(Relation targetRelation) public java.util.ArrayList<Integer> getSourceAttributes() public void setSourceAttributes(java.util.ArrayList<Integer> sourceAttributes) public long getId() public void setId(long id) public boolean isVirtual() public void setVirtual(boolean virtual) public boolean isEnforced() public void setEnforced(boolean enforced) public Integer getTargetKey()