java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties
org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ForeignKeyProperties

public class ForeignKeyProperties extends RelationshipProperties
ForeignKeyProperties describes a foreign key relationship between two columns in different tables in a database. The foreign key shows where the primary key of one table is used in another table to show they are related. Foreign key relationships are typically discovered from analysis of the values stored in the rows, or asserted by the DBA/steward.
  • Constructor Details

    • ForeignKeyProperties

      public ForeignKeyProperties()
      Default constructor
    • ForeignKeyProperties

      public ForeignKeyProperties(ForeignKeyProperties template)
      Copy/clone constructor for a foreign key.
      Parameters:
      template - template object to copy.
  • Method Details

    • setName

      public void setName(String name)
      Set up the display name for UIs and reports.
      Parameters:
      name - String name
    • getName

      public String getName()
      Returns the stored display name property for the foreign key.
      Returns:
      String name
    • setDescription

      public void setDescription(String description)
      Set up description of the foreign key.
      Parameters:
      description - String
    • getDescription

      public String getDescription()
      Return the description for the foreign key.
      Returns:
      String description
    • setConfidence

      public void setConfidence(int confidence)
      Set up the level of confidence that the foreign key is correct. This is a value between 0 and 100.
      Parameters:
      confidence - int
    • getConfidence

      public int getConfidence()
      Returns the level of confidence that the foreign key is correct. This is a value between 0 and 100.
      Returns:
      int
    • setSteward

      public void setSteward(String steward)
      Set up the id of the steward who assigned the foreign key (or approved the discovered value).
      Parameters:
      steward - user id or name of steward
    • getSteward

      public String getSteward()
      Returns the name of the steward who assigned the foreign key (or approved the discovered value).
      Returns:
      user id or name of steward
    • setSource

      public void setSource(String source)
      Set up the id of the source of the knowledge of the foreign key.
      Parameters:
      source - String id
    • getSource

      public String getSource()
      Returns the id of the source of the knowledge of the foreign key.
      Returns:
      String id
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class RelationshipProperties
      Returns:
      print out of variables in a JSON-style
    • equals

      public boolean equals(Object objectToCompare)
      Compare the values of the supplied object with those stored in the current object.
      Overrides:
      equals in class RelationshipProperties
      Parameters:
      objectToCompare - supplied object
      Returns:
      boolean result of comparison
    • hashCode

      public int hashCode()
      Return hash code based on properties.
      Overrides:
      hashCode in class RelationshipProperties
      Returns:
      int