Class TypeDefLink

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    TypeDefSummary

    public class TypeDefLink
    extends TypeDefElementHeader
    The TypeDefLink holds basic identifying information used to link one TypeDef to another. It is used in the definition of types, ie in the TypeDefs themselves. Examples include linking a classification to an entity, identifying super types and defining the entities at either end of a relationship.

    TypeDefs are identified using both the guid and the type name. Both should be unique and most processing is with the type name because that is easiest for people to work with. The guid provides a means to check the identity of the types since it is easy to introduce two types with the same name in the distributed model.

    See Also:
    Serialized Form
    • Field Detail

      • replacedByTypeGUID

        protected String replacedByTypeGUID
      • replacedByTypeName

        protected String replacedByTypeName
    • Constructor Detail

      • TypeDefLink

        public TypeDefLink()
        Default constructor
      • TypeDefLink

        public TypeDefLink​(TypeDefLink template)
        Copy/clone constructor copies the values from the supplied template.
        Parameters:
        template - TypeDefLink
    • Method Detail

      • getGUID

        public String getGUID()
        Return the unique identifier for this TypeDef.
        Returns:
        String guid
      • setGUID

        public void setGUID​(String guid)
        Set up the unique identifier for this TypeDef.
        Parameters:
        guid - String guid
      • getName

        public String getName()
        Return the type name for this TypeDef. In simple environments, the type name is unique but where metadata repositories from different vendors are in operation it is possible that 2 types may have a name clash. The GUID is the reliable unique identifier.
        Returns:
        String name
      • setName

        public void setName​(String name)
        Set up the type name for this TypeDef. In simple environments, the type name is unique but where metadata repositories from different vendors are in operation it is possible that 2 types may have a name clash. The GUID is the reliable unique identifier.
        Parameters:
        name - String name
      • getStatus

        public TypeDefStatus getStatus()
        Return the status of this attribute.
        Returns:
        status (null means ACTIVE)
      • setStatus

        public void setStatus​(TypeDefStatus status)
        Set up the status of this type.
        Parameters:
        status - status (null means ACTIVE)
      • getReplacedByTypeGUID

        public String getReplacedByTypeGUID()
        If the type has been replaced, this contains the GUID of the new type.
        Returns:
        new type GUID
      • setReplacedByTypeGUID

        public void setReplacedByTypeGUID​(String replacedByTypeGUID)
        If the type has been replaced, this contains the GUID of the new type.
        Parameters:
        replacedByTypeGUID - new type GUID
      • getReplacedByTypeName

        public String getReplacedByTypeName()
        If the type has been renamed, this contains the name of the new type.
        Returns:
        new type name
      • setReplacedByTypeName

        public void setReplacedByTypeName​(String replacedByTypeName)
        If the type has been renamed, this contains the name of the new type.
        Parameters:
        replacedByTypeName - new type name
      • toString

        public String toString()
        Standard toString method.
        Overrides:
        toString in class Object
        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 Object
        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 Object
        Returns:
        in hash code