Class AssociationRef
java.lang.Object
org.alfresco.service.cmr.repository.AssociationRef
- All Implemented Interfaces:
Serializable
,EntityRef
This class represents a regular, named node relationship between two nodes.
Note that the ID of the association might not be populated.
- Author:
- Derek Hulley
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAssociationRef
(Long id, NodeRef sourceRef, QName assocTypeQName, NodeRef targetRef) Construct a representation of a source --- name ----> target relationship.AssociationRef
(String assocRefStr) AssociationRef
(NodeRef sourceRef, QName assocTypeQName, NodeRef targetRef) Construct a representation of a source --- name ----> target relationship. -
Method Summary
-
Constructor Details
-
AssociationRef
Construct a representation of a source --- name ----> target relationship.- Parameters:
sourceRef
- the source reference - never nullassocTypeQName
- the qualified name of the association type - never nulltargetRef
- the target node reference - never null.
-
AssociationRef
Construct a representation of a source --- name ----> target relationship.- Parameters:
id
- unique identifier - may be nullsourceRef
- the source reference - never nullassocTypeQName
- the qualified name of the association type - never nulltargetRef
- the target node reference - never null.
-
AssociationRef
- Parameters:
assocRefStr
- a string of the form id|sourceNodeRef|targetNodeRef|assocTypeQName.
-
-
Method Details
-
toString
-
equals
Compares:sourceRef
targetRef
assocTypeQName
-
hashCode
public int hashCode() -
getId
Gets the unique identifier for this association.- Returns:
- the unique identifier for this association, or null if the ID was not given at the time of construction
-
getTypeQName
Get the qualified name of the source-target association- Returns:
- Returns the qualified name of the source-target association.
-
getTargetRef
- Returns:
- Returns the child node reference - never null
-
getSourceRef
- Returns:
- Returns the parent node reference, which may be null if this represents the imaginary reference to the root node
-