Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.service.cmr.repository
Class AssociationRef
java.lang.Object
  org.alfresco.service.cmr.repository.AssociationRef
All Implemented Interfaces:
EntityRef, Serializable

@org.alfresco.api.AlfrescoPublicApi
public class AssociationRef
extends Object
implements EntityRef, Serializable
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:
Serialized Form

Constructor Summary
AssociationRef(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
boolean
equals(Object o)
          Compares: sourceRef targetRef assocTypeQName
getId()
          Gets the unique identifier for this association.
getSourceRef()
getTargetRef()
getTypeQName()
          Get the qualified name of the source-target association
int
hashCode()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Constructor Detail
AssociationRef
public AssociationRef(NodeRef sourceRef,
                      QName assocTypeQName,
                      NodeRef targetRef)
Construct a representation of a source --- name ----> target relationship.
Parameters:
sourceRef - the source reference - never null
assocTypeQName - the qualified name of the association type - never null
targetRef - the target node reference - never null.

AssociationRef
public AssociationRef(Long id,
                      NodeRef sourceRef,
                      QName assocTypeQName,
                      NodeRef targetRef)
Construct a representation of a source --- name ----> target relationship.
Parameters:
id - unique identifier - may be null
sourceRef - the source reference - never null
assocTypeQName - the qualified name of the association type - never null
targetRef - the target node reference - never null.

AssociationRef
public AssociationRef(String assocRefStr)
Parameters:
assocRefStr - a string of the form id|sourceNodeRef|targetNodeRef|assocTypeQName.
Method Detail
toString
public String toString()
Overrides:
toString in class Object
Returns:
Returns a string of the form sourceNodeRef|targetNodeRef|assocTypeQName|assocQName

equals
public boolean equals(Object o)
Compares:
  • sourceRef
  • targetRef
  • assocTypeQName
Overrides:
equals in class Object

hashCode
public int hashCode()
Overrides:
hashCode in class Object

getId
public Long 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
public QName getTypeQName()
Get the qualified name of the source-target association
Returns:
Returns the qualified name of the source-target association.

getTargetRef
public NodeRef getTargetRef()
Returns:
Returns the child node reference - never null

getSourceRef
public NodeRef getSourceRef()
Returns:
Returns the parent node reference, which may be null if this represents the imaginary reference to the root node

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.