Class OpenMetadataRelationshipDef


public class OpenMetadataRelationshipDef extends OpenMetadataTypeDef
OpenMetadataRelationshipDef describes the type of a relationship. A relationships links two entities together. The OpenMetadataRelationshipDef defines the types of those entities in the RelationshipEndDefs. It also defines if this relationship allows classifications to propagate through it.
  • Constructor Details

    • OpenMetadataRelationshipDef

      public OpenMetadataRelationshipDef()
      Minimal constructor builds an empty OpenMetadataRelationshipDef
    • OpenMetadataRelationshipDef

      public OpenMetadataRelationshipDef(OpenMetadataTypeDefCategory category, String guid, String name, long version, String versionName)
      Typical constructor is passed the properties of the typedef's super class being constructed.
      Parameters:
      category - category of this OpenMetadataTypeDef
      guid - unique id for the OpenMetadataTypeDef
      name - unique name for the OpenMetadataTypeDef
      version - active version number for the OpenMetadataTypeDef
      versionName - name for the active version of the OpenMetadataTypeDef
    • OpenMetadataRelationshipDef

      public OpenMetadataRelationshipDef(OpenMetadataRelationshipDef templateTypeDef)
      Copy/clone constructor creates a copy of the supplied template.
      Parameters:
      templateTypeDef - template to copy
  • Method Details

    • cloneFromSubclass

      public OpenMetadataTypeDef cloneFromSubclass()
      Delegate the process of cloning to the subclass.
      Specified by:
      cloneFromSubclass in class OpenMetadataTypeDef
      Returns:
      subclass of OpenMetadataTypeDef
    • getPropagationRule

      public OpenMetadataClassificationPropagationRule getPropagationRule()
      Return the rule that determines if classifications are propagated across this relationship.
      Returns:
      OpenMetadataClassificationPropagationRule Enum
    • setPropagationRule

      public void setPropagationRule(OpenMetadataClassificationPropagationRule propagationRule)
      Set up the rule that determines if classifications are propagated across this relationship.
      Parameters:
      propagationRule - OpenMetadataClassificationPropagationRule Enum
    • getEndDef1

      public OpenMetadataRelationshipEndDef getEndDef1()
      Return the details associated with the first end of the relationship.
      Returns:
      endDef1 OpenMetadataRelationshipEndDef
    • setEndDef1

      public void setEndDef1(OpenMetadataRelationshipEndDef endDef1)
      Set up the details associated with the first end of the relationship.
      Parameters:
      endDef1 - OpenMetadataRelationshipEndDef
    • getEndDef2

      public OpenMetadataRelationshipEndDef getEndDef2()
      Return the details associated with the second end of the relationship.
      Returns:
      endDef2 OpenMetadataRelationshipEndDef
    • setEndDef2

      public void setEndDef2(OpenMetadataRelationshipEndDef endDef2)
      Set up the details associated with the second end of the relationship.
      Parameters:
      endDef2 - OpenMetadataRelationshipEndDef
    • getMultiLink

      public boolean getMultiLink()
      Return whether multiple relationships of this type are allowed between the same two entities.
      Returns:
      boolean flag
    • setMultiLink

      public void setMultiLink(boolean multiLink)
      Set up whether multiple relationships of this type are allowed between the same two entities.
      Parameters:
      multiLink - boolean flag
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class OpenMetadataTypeDef
      Returns:
      JSON style description of variables.
    • equals

      public boolean equals(Object objectToCompare)
      Validate that an object is equal depending on their stored values.
      Overrides:
      equals in class OpenMetadataTypeDef
      Parameters:
      objectToCompare - object
      Returns:
      boolean result
    • hashCode

      public int hashCode()
      Return a hash code based on the values of this object.
      Overrides:
      hashCode in class OpenMetadataTypeDef
      Returns:
      in hash code