Class AtlasRelationshipDef

java.lang.Object
com.azure.analytics.purview.datamap.models.AtlasRelationshipDef
All Implemented Interfaces:
com.azure.json.JsonSerializable<AtlasRelationshipDef>

public final class AtlasRelationshipDef extends Object implements com.azure.json.JsonSerializable<AtlasRelationshipDef>
AtlasRelationshipDef is a TypeDef that defines a relationship. As with other typeDefs the AtlasRelationshipDef has a name. Once created the RelationshipDef has a guid. The name and the guid are the 2 ways that the RelationshipDef is identified. RelationshipDefs have 2 ends, each of which specify cardinality, an EntityDef type name and name and optionally whether the end is a container. RelationshipDefs can have AttributeDefs - though only primitive types are allowed. RelationshipDefs have a relationshipCategory specifying the UML type of relationship required The way EntityDefs and RelationshipDefs are intended to be used is that EntityDefs will define AttributeDefs these AttributeDefs will not specify an EntityDef type name as their types. RelationshipDefs introduce new attributes to the entity instances. For example EntityDef A might have attributes attr1,attr2,attr3 EntityDef B might have attributes attr4,attr5,attr6 RelationshipDef AtoB might define 2 ends end1: type A, name attr7 end2: type B, name attr8 When an instance of EntityDef A is created, it will have attributes attr1,attr2,attr3,attr7 When an instance of EntityDef B is created, it will have attributes attr4,attr5,attr6,attr8 In this way relationshipDefs can be authored separately from entityDefs and can inject relationship attributes into the entity instances.
  • Constructor Details

    • AtlasRelationshipDef

      public AtlasRelationshipDef()
      Creates an instance of AtlasRelationshipDef class.
  • Method Details

    • getCategory

      public TypeCategory getCategory()
      Get the category property: The enum of type category.
      Returns:
      the category value.
    • setCategory

      public AtlasRelationshipDef setCategory(TypeCategory category)
      Set the category property: The enum of type category.
      Parameters:
      category - the category value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getCreateTime

      public Long getCreateTime()
      Get the createTime property: The created time of the record.
      Returns:
      the createTime value.
    • setCreateTime

      public AtlasRelationshipDef setCreateTime(Long createTime)
      Set the createTime property: The created time of the record.
      Parameters:
      createTime - the createTime value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getCreatedBy

      public String getCreatedBy()
      Get the createdBy property: The user who created the record.
      Returns:
      the createdBy value.
    • setCreatedBy

      public AtlasRelationshipDef setCreatedBy(String createdBy)
      Set the createdBy property: The user who created the record.
      Parameters:
      createdBy - the createdBy value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getDateFormatter

      public DateFormat getDateFormatter()
      Get the dateFormatter property: The date format.
      Returns:
      the dateFormatter value.
    • setDateFormatter

      public AtlasRelationshipDef setDateFormatter(DateFormat dateFormatter)
      Set the dateFormatter property: The date format.
      Parameters:
      dateFormatter - the dateFormatter value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getDescription

      public String getDescription()
      Get the description property: The description of the type definition.
      Returns:
      the description value.
    • setDescription

      public AtlasRelationshipDef setDescription(String description)
      Set the description property: The description of the type definition.
      Parameters:
      description - the description value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getGuid

      public String getGuid()
      Get the guid property: The GUID of the type definition.
      Returns:
      the guid value.
    • setGuid

      public AtlasRelationshipDef setGuid(String guid)
      Set the guid property: The GUID of the type definition.
      Parameters:
      guid - the guid value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getName

      public String getName()
      Get the name property: The name of the type definition.
      Returns:
      the name value.
    • setName

      public AtlasRelationshipDef setName(String name)
      Set the name property: The name of the type definition.
      Parameters:
      name - the name value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getOptions

      public Map<String,String> getOptions()
      Get the options property: The options for the type definition.
      Returns:
      the options value.
    • setOptions

      public AtlasRelationshipDef setOptions(Map<String,String> options)
      Set the options property: The options for the type definition.
      Parameters:
      options - the options value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getServiceType

      public String getServiceType()
      Get the serviceType property: The service type.
      Returns:
      the serviceType value.
    • setServiceType

      public AtlasRelationshipDef setServiceType(String serviceType)
      Set the serviceType property: The service type.
      Parameters:
      serviceType - the serviceType value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getTypeVersion

      public String getTypeVersion()
      Get the typeVersion property: The version of the type.
      Returns:
      the typeVersion value.
    • setTypeVersion

      public AtlasRelationshipDef setTypeVersion(String typeVersion)
      Set the typeVersion property: The version of the type.
      Parameters:
      typeVersion - the typeVersion value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getUpdateTime

      public Long getUpdateTime()
      Get the updateTime property: The update time of the record.
      Returns:
      the updateTime value.
    • setUpdateTime

      public AtlasRelationshipDef setUpdateTime(Long updateTime)
      Set the updateTime property: The update time of the record.
      Parameters:
      updateTime - the updateTime value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getUpdatedBy

      public String getUpdatedBy()
      Get the updatedBy property: The user who updated the record.
      Returns:
      the updatedBy value.
    • setUpdatedBy

      public AtlasRelationshipDef setUpdatedBy(String updatedBy)
      Set the updatedBy property: The user who updated the record.
      Parameters:
      updatedBy - the updatedBy value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getVersion

      public Long getVersion()
      Get the version property: The version of the record.
      Returns:
      the version value.
    • setVersion

      public AtlasRelationshipDef setVersion(Long version)
      Set the version property: The version of the record.
      Parameters:
      version - the version value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getLastModifiedTS

      public String getLastModifiedTS()
      Get the lastModifiedTS property: ETag for concurrency control.
      Returns:
      the lastModifiedTS value.
    • setLastModifiedTS

      public AtlasRelationshipDef setLastModifiedTS(String lastModifiedTS)
      Set the lastModifiedTS property: ETag for concurrency control.
      Parameters:
      lastModifiedTS - the lastModifiedTS value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getAttributeDefs

      public List<AtlasAttributeDef> getAttributeDefs()
      Get the attributeDefs property: An array of attribute definitions.
      Returns:
      the attributeDefs value.
    • setAttributeDefs

      public AtlasRelationshipDef setAttributeDefs(List<AtlasAttributeDef> attributeDefs)
      Set the attributeDefs property: An array of attribute definitions.
      Parameters:
      attributeDefs - the attributeDefs value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getEndDef1

      public AtlasRelationshipEndDef getEndDef1()
      Get the endDef1 property: The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.
      Returns:
      the endDef1 value.
    • setEndDef1

      public AtlasRelationshipDef setEndDef1(AtlasRelationshipEndDef endDef1)
      Set the endDef1 property: The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.
      Parameters:
      endDef1 - the endDef1 value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getEndDef2

      public AtlasRelationshipEndDef getEndDef2()
      Get the endDef2 property: The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.
      Returns:
      the endDef2 value.
    • setEndDef2

      public AtlasRelationshipDef setEndDef2(AtlasRelationshipEndDef endDef2)
      Set the endDef2 property: The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.
      Parameters:
      endDef2 - the endDef2 value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getRelationshipCategory

      public RelationshipCategory getRelationshipCategory()
      Get the relationshipCategory property: The Relationship category determines the style of relationship around containment and lifecycle. UML terminology is used for the values. ASSOCIATION is a relationship with no containment. COMPOSITION and AGGREGATION are containment relationships. The difference being in the lifecycles of the container and its children. In the COMPOSITION case, the children cannot exist without the container. For AGGREGATION, the life cycles of the container and children are totally independent.
      Returns:
      the relationshipCategory value.
    • setRelationshipCategory

      public AtlasRelationshipDef setRelationshipCategory(RelationshipCategory relationshipCategory)
      Set the relationshipCategory property: The Relationship category determines the style of relationship around containment and lifecycle. UML terminology is used for the values. ASSOCIATION is a relationship with no containment. COMPOSITION and AGGREGATION are containment relationships. The difference being in the lifecycles of the container and its children. In the COMPOSITION case, the children cannot exist without the container. For AGGREGATION, the life cycles of the container and children are totally independent.
      Parameters:
      relationshipCategory - the relationshipCategory value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • getRelationshipLabel

      public String getRelationshipLabel()
      Get the relationshipLabel property: The label of the relationship.
      Returns:
      the relationshipLabel value.
    • setRelationshipLabel

      public AtlasRelationshipDef setRelationshipLabel(String relationshipLabel)
      Set the relationshipLabel property: The label of the relationship.
      Parameters:
      relationshipLabel - the relationshipLabel value to set.
      Returns:
      the AtlasRelationshipDef object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<AtlasRelationshipDef>
      Throws:
      IOException
    • fromJson

      public static AtlasRelationshipDef fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AtlasRelationshipDef from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AtlasRelationshipDef if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the AtlasRelationshipDef.