org.alfresco.repo.domain
Interface NodeAssoc

All Known Implementing Classes:
NodeAssocImpl

public interface NodeAssoc

Represents a generic association between two nodes. The association is named and bidirectional by default.


Method Summary
 void buildAssociation(Node sourceNode, Node targetNode)
          Wires up the necessary bits on the source and target nodes so that the association is immediately bidirectional.
 java.lang.Long getId()
           
 AssociationRef getNodeAssocRef(QNameDAO qnameDAO)
          Convenience method to retrieve the association's reference
 Node getSource()
           
 Node getTarget()
           
 QName getTypeQName(QNameDAO qnameDAO)
          Convenience method to retrieve the association's type QName
 java.lang.Long getTypeQNameId()
           
 java.lang.Long getVersion()
           
 void setTypeQName(QNameDAO qnameDAO, QName typeQName)
          Convenience method to set the association's type
 void setTypeQNameId(java.lang.Long typeQNameId)
           
 

Method Detail

buildAssociation

void buildAssociation(Node sourceNode,
                      Node targetNode)
Wires up the necessary bits on the source and target nodes so that the association is immediately bidirectional.

The association attributes still have to be set.

Parameters:
sourceNode -
targetNode -
See Also:
#setName(String)

getNodeAssocRef

AssociationRef getNodeAssocRef(QNameDAO qnameDAO)
Convenience method to retrieve the association's reference

Parameters:
qnameDAO - helper DAO
Returns:
the association's reference

getTypeQName

QName getTypeQName(QNameDAO qnameDAO)
Convenience method to retrieve the association's type QName

Parameters:
qnameDAO - helper DAO
Returns:
the association's type QName

setTypeQName

void setTypeQName(QNameDAO qnameDAO,
                  QName typeQName)
Convenience method to set the association's type

Parameters:
qnameDAO - the helper DAO
typeQName - the association's type QName

getId

java.lang.Long getId()

getVersion

java.lang.Long getVersion()
Returns:
Returns the current version number

getSource

Node getSource()

getTarget

Node getTarget()

getTypeQNameId

java.lang.Long getTypeQNameId()
Returns:
Returns the type of the association

setTypeQNameId

void setTypeQNameId(java.lang.Long typeQNameId)
Parameters:
typeQNameId - the association's dictionary type


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.