Class CandidateKey


public class CandidateKey extends ColumnOrderedKey
Representation of a Candidate key. This represents a UNIQUE candidate key on a column or columns.
  • Constructor Details

    • CandidateKey

      public CandidateKey(Table table, Map<String,String> extensions)
      Constructor.
      Parameters:
      table - Table to apply this key to
      extensions - Any extensions for this unique constraint
  • Method Details

    • equals

      public boolean equals(Object obj)
      Description copied from class: Key
      Equality operator.
      Overrides:
      equals in class Key
      Parameters:
      obj - Object to compare against
      Returns:
      Whether they are equal.
    • hashCode

      public int hashCode()
      Description copied from class: Key
      Hashcode operator.
      Overrides:
      hashCode in class Key
      Returns:
      The hashcode
    • toString

      public String toString()
      Stringify method. Returns
      UNIQUE (col1, ...)
      .
      Overrides:
      toString in class Object
      Returns:
      String version of this object.