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_ATTRIBUTE
AttributedType.QUERY_ATTRIBUTE
IDENTITY
ID
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, setId
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getAttribute, getAttributes, removeAttribute, setAttribute, setId
public RelationshipReference(Relationship relationship)
public String getId()
AttributedType
getId
in interface AttributedType
getId
in class AbstractAttributedType
public 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 © 2015. All rights reserved.