Class Reference

java.lang.Object
com.atlan.model.core.AtlanObject
com.atlan.model.relations.Reference
All Implemented Interfaces:
AuditDetail, Serializable, Comparable<Reference>
Direct Known Subclasses:
Asset

public class Reference extends AtlanObject implements Comparable<Reference>, AuditDetail
See Also:
  • Constructor Details

  • Method Details

    • to

      public static Reference to(String typeName, String guid)
      Quickly create a new reference to another asset, by its GUID.
      Parameters:
      typeName - type of the asset to reference
      guid - GUID of the asset to reference
      Returns:
      a reference to another asset
    • by

      public static Reference by(String typeName, String qualifiedName)
      Quickly create a new reference to another asset, by its qualifiedName.
      Parameters:
      typeName - type of the asset to reference
      qualifiedName - of the asset to reference
      Returns:
      a reference to another asset
    • validateRequired

      protected static void validateRequired(String typeName, Map<String,String> parameters) throws InvalidRequestException
      Validate that the required parameters are present to carry out an operation.
      Parameters:
      typeName - type of asset being validated
      parameters - mapping of required parameters, keyed by parameter name with the value of that parameter
      Throws:
      InvalidRequestException - if any of the parameters have a null or empty value
    • validateRelationship

      protected static void validateRelationship(String typeName, Map<String,String> parameters) throws InvalidRequestException
      Validate that the required parameters are present to set up a relationship.
      Parameters:
      typeName - type of asset to which the relationship is being created
      parameters - mapping of required parameters, keyed by parameter name with the value of that parameter
      Throws:
      InvalidRequestException - if any of the parameters have a null or empty value
    • isComplete

      public boolean isComplete()
      When true, indicates that this object represents a complete view of the entity. When false, this object is only a reference or some partial view of the entity.
    • setCompleteObject

      protected void setCompleteObject()
      Sets the internal tracking of this object to indicate it is a complete representation of an entity.
    • isValidReferenceByGuid

      public boolean isValidReferenceByGuid()
      Indicates whether this object can be used as a valid reference by GUID.
      Returns:
      true if it is a valid GUID reference, false otherwise
    • isValidReferenceByQualifiedName

      public boolean isValidReferenceByQualifiedName()
      Indicates whether this object can be used as a valid reference by qualifiedName.
      Returns:
      true if it is a valid qualifiedName reference, false otherwise
    • isValidReference

      public boolean isValidReference()
      Indicates whether this object can be used as a reference (relationship).
      Returns:
      true if it is a valid reference, false otherwise
    • compareTo

      public int compareTo(Reference o)
      Specified by:
      compareTo in interface Comparable<Reference>
    • builder

      public static Reference.ReferenceBuilder<?,?> builder()
    • toBuilder

      public Reference.ReferenceBuilder<?,?> toBuilder()
    • getSemantic

      public Reference.SaveSemantic getSemantic()
      Semantic for how this relationship should be saved, if used in an asset request on which .save() is called.
    • getCompleteObject

      public boolean getCompleteObject()
      Internal tracking of whether this represents a complete view of an object, or not.
    • getTypeName

      public String getTypeName()
      Name of the type that defines the entity.
      Specified by:
      getTypeName in interface AuditDetail
    • getGuid

      public String getGuid()
      Globally-unique identifier for the entity.
    • getDisplayText

      public String getDisplayText()
      Human-readable name of the entity.
    • getEntityStatus

      public String getEntityStatus()
      Status of the entity (if this is a related entity).
    • getRelationshipType

      public String getRelationshipType()
      Type of the relationship (if this is a related entity).
    • getRelationshipGuid

      public String getRelationshipGuid()
      Unique identifier of the relationship (when this is a related entity).
    • getRelationshipStatus

      public AtlanStatus getRelationshipStatus()
      Status of the relationship (when this is a related entity).
    • getRelationshipAttributes

      public RelationshipAttributes getRelationshipAttributes()
      Attributes specific to the relationship.
    • getUniqueAttributes

      public UniqueAttributes getUniqueAttributes()
      Attribute(s) that uniquely identify the entity (when this is a related entity). If the guid is not provided, these must be provided.
    • getLabels

      public List<String> getLabels()
      Arbitrary textual labels for the asset.
    • getCustomAttributes

      public Map<String,String> getCustomAttributes()
      Attribute(s) that handle custom information direct from source systems. Not to be confused with custom metadata attributes, which are user-defined and user-managed, and are instead found in customMetadataSets.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AtlanObject
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class AtlanObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AtlanObject
    • toString

      public String toString()
      Description copied from class: AtlanObject
      Overrides:
      toString in class AtlanObject