java.lang.Object
org.odpi.openmetadata.accessservices.digitalservice.metadataelements.RelatedElement

public class RelatedElement extends Object
RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub of the related element.
  • Constructor Details

    • RelatedElement

      public RelatedElement()
      Default constructor
    • RelatedElement

      public RelatedElement(RelatedElement template)
      Copy/clone constructor
      Parameters:
      template - object to copy
  • Method Details

    • getRelationshipHeader

      public ElementHeader getRelationshipHeader()
      Return the element header associated with the relationship.
      Returns:
      element header object
    • setRelationshipHeader

      public void setRelationshipHeader(ElementHeader relationshipHeader)
      Set up the element header associated with the relationship.
      Parameters:
      relationshipHeader - element header object
    • getRelationshipProperties

      public RelationshipProperties getRelationshipProperties()
      Return details of the relationship
      Returns:
      relationship properties
    • setRelationshipProperties

      public void setRelationshipProperties(RelationshipProperties relationshipProperties)
      Set up relationship properties
      Parameters:
      relationshipProperties - relationship properties
    • getRelatedElement

      public ElementStub getRelatedElement()
      Return the element header associated with end 1 of the relationship.
      Returns:
      element stub object
    • setRelatedElement

      public void setRelatedElement(ElementStub relatedElement)
      Set up the element header associated with end 1 of the relationship.
      Parameters:
      relatedElement - element stub object
    • toString

      public String toString()
      JSON-style toString
      Overrides:
      toString in class Object
      Returns:
      return string containing the property names and values
    • equals

      public boolean equals(Object objectToCompare)
      Return comparison result based on the content of the properties.
      Overrides:
      equals in class Object
      Parameters:
      objectToCompare - test object
      Returns:
      result of comparison
    • hashCode

      public int hashCode()
      Return hash code for this object
      Overrides:
      hashCode in class Object
      Returns:
      int hash code