Class ForeignKey

java.lang.Object
com.invirgance.convirgance.olap.sql.ForeignKey

public class ForeignKey extends Object
Captures the connection between a source table and a target table.
Author:
jbanes
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares this ForeignKey to another first by reference, then by instance fields.
    Returns the String representing the key
    Returns the target table associated with the foreignKey
    int
    Returns the hashCode for the ForeignKey object based on all of its instance fields.
    void
    setSource(Table source)
    Sets the provided source table to the key.
    void
    setSourceKey(String sourceKey)
    Sets the provided String as the key for this ForeignKey object.
    void
    setTarget(Table target)
    Sets the provided target table to be associated with this foreignKey.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ForeignKey

      public ForeignKey()
  • Method Details

    • setSource

      public void setSource(Table source)
      Sets the provided source table to the key.
      Parameters:
      source - the source Table.
    • getSourceKey

      public String getSourceKey()
      Returns the String representing the key
      Returns:
      the key String
    • setSourceKey

      public void setSourceKey(String sourceKey)
      Sets the provided String as the key for this ForeignKey object.
      Parameters:
      sourceKey - the String for the key.
    • getTarget

      public Table getTarget()
      Returns the target table associated with the foreignKey
      Returns:
      the target Table.
    • setTarget

      public void setTarget(Table target)
      Sets the provided target table to be associated with this foreignKey.
      Parameters:
      target - the target table associated with the foreign key.
    • equals

      public boolean equals(Object obj)
      Compares this ForeignKey to another first by reference, then by instance fields.
      Overrides:
      equals in class Object
      Parameters:
      obj - a ForeignKey object to compare to.
      Returns:
      true if the objects are the same by reference or by instance fields.
    • hashCode

      public int hashCode()
      Returns the hashCode for the ForeignKey object based on all of its instance fields.
      Overrides:
      hashCode in class Object
      Returns:
      int representing the hashCode.