public final class RelationshipReference extends AbstractAttributedType implements Relationship
Adapter class that encapsulates a target Relationship instance and provides additional methods
to resolve the referenced IdentityType instances.
This class is particularly used when using multiple stores to store different identity and relationship types. In this scenario, the referenced identity type may not be stored in the same store of the relationship, which requires to hold only an identifier-based reference to the referenced type.
Relationship.RELATIONSHIP_QUERY_ATTRIBUTEAttributedType.QUERY_ATTRIBUTEIDENTITYID| Constructor and Description |
|---|
RelationshipReference(Relationship relationship) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIdentityTypeReference(String descriptor,
String referencedId)
Add a reference to a
IdentityType. |
String |
getId()
Returns the unique identifier for this instance
|
Map<String,String> |
getIdentityTypeReference() |
Relationship |
getRelationship()
Return the target relationship instance.
|
equals, getAttribute, getAttributes, getAttributesMap, hashCode, removeAttribute, setAttribute, setIdclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAttribute, getAttributes, removeAttribute, setAttribute, setIdpublic RelationshipReference(Relationship relationship)
public String getId()
AttributedTypegetId in interface AttributedTypegetId in class AbstractAttributedTypepublic void addIdentityTypeReference(String descriptor, String referencedId)
Add a reference to a IdentityType.
descriptor - The descriptor for the identity type. The descriptor usually matches the property name on the
target
relationship instance used to store the identity type instance.referencedId - The identifier of the identity type.public Relationship getRelationship()
Return the target relationship instance.
Copyright © 2021. All rights reserved.