Class Relationship
java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.RepositoryElementHeader
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceElementHeader
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship
- All Implemented Interfaces:
Serializable
Relationship is a POJO that manages the properties of an open metadata relationship. This includes information
about the relationship type, the two entities it connects and the properties it holds.
- See Also:
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader
CURRENT_AUDIT_HEADER_VERSION
-
Constructor Summary
ConstructorDescriptionDefault constructor creates an empty relationship linked to nothing.Relationship
(Relationship templateElement) Copy/clone constructor builds a relationship from the supplied template. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Validate that an object is equal depending on their stored values.Return details of the entity at the first end of the relationship.Return details of the entity at second end of the relationship.Return a copy of all the properties for this relationship.int
hashCode()
Return a hash code based on the values of this object.boolean
relatedToEntity
(String entityGUID) Test to determine if the supplied entity is linked by this relationship.returnLinkedEntity
(String entityGUID) Return the GUID at the other end of the relationship to the supplied entity.void
setEntityOneProxy
(EntityProxy entityOneProxy) Set up details of the entity at the first end of the relationship.void
setEntityTwoProxy
(EntityProxy entityTwoProxy) Set up the identity of the proxy at the other end of the relationship.void
setProperties
(InstanceProperties newProperties) Set up the properties for this relationship.toString()
Standard toString method.Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader
getGUID, getInstanceURL, getReIdentifiedFromGUID, setGUID, setInstanceURL, setReIdentifiedFromGUID
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader
getCreatedBy, getCreateTime, getInstanceLicense, getInstanceProvenanceType, getMaintainedBy, getMappingProperties, getMetadataCollectionId, getMetadataCollectionName, getReplicatedBy, getStatus, getStatusOnDelete, getType, getUpdatedBy, getUpdateTime, getVersion, setCreatedBy, setCreateTime, setInstanceLicense, setInstanceProvenanceType, setMaintainedBy, setMappingProperties, setMetadataCollectionId, setMetadataCollectionName, setReplicatedBy, setStatus, setStatusOnDelete, setType, setUpdatedBy, setUpdateTime, setVersion
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.RepositoryElementHeader
getHeaderVersion, setHeaderVersion
-
Constructor Details
-
Relationship
public Relationship()Default constructor creates an empty relationship linked to nothing. -
Relationship
Copy/clone constructor builds a relationship from the supplied template.- Parameters:
templateElement
- template relationship to copy
-
-
Method Details
-
returnLinkedEntity
Return the GUID at the other end of the relationship to the supplied entity.- Parameters:
entityGUID
- unique identifier for the entity to test.- Returns:
- String guid for the entity at the other end of the relationship. Null if no matching entity found.
-
getProperties
Return a copy of all the properties for this relationship. Null means no properties exist.- Returns:
- InstanceProperties
-
setProperties
Set up the properties for this relationship.- Parameters:
newProperties
- InstanceProperties object
-
getEntityOneProxy
Return details of the entity at the first end of the relationship.- Returns:
- entityOneProxy EntityProxy object for the first end of the relationship.
-
setEntityOneProxy
Set up details of the entity at the first end of the relationship.- Parameters:
entityOneProxy
- EntityProxy object for the first end of the relationship.
-
getEntityTwoProxy
Return details of the entity at second end of the relationship.- Returns:
- EntityProxy object for the second end of the relationship
-
setEntityTwoProxy
Set up the identity of the proxy at the other end of the relationship.- Parameters:
entityTwoProxy
- EntityProxy
-
toString
Standard toString method.- Overrides:
toString
in classInstanceHeader
- Returns:
- JSON style description of variables.
-
equals
Validate that an object is equal depending on their stored values.- Overrides:
equals
in classInstanceHeader
- Parameters:
objectToCompare
- object- Returns:
- boolean result
-
hashCode
public int hashCode()Return a hash code based on the values of this object.- Overrides:
hashCode
in classInstanceHeader
- Returns:
- in hash code