org.alfresco.repo.domain.hibernate
Class NodeAssocImpl

java.lang.Object
  extended by org.alfresco.repo.domain.hibernate.NodeAssocImpl
All Implemented Interfaces:
java.io.Serializable, NodeAssoc

public class NodeAssocImpl
extends java.lang.Object
implements NodeAssoc, java.io.Serializable

Hibernate-specific implementation of the generic node association

See Also:
Serialized Form

Constructor Summary
NodeAssocImpl()
           
 
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.
 boolean equals(java.lang.Object obj)
           
 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()
           
 int hashCode()
           
 void setTypeQName(QNameDAO qnameDAO, QName typeQName)
          Convenience method to set the association's type
 void setTypeQNameId(java.lang.Long typeQNameId)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeAssocImpl

public NodeAssocImpl()
Method Detail

buildAssociation

public void buildAssociation(Node sourceNode,
                             Node targetNode)
Description copied from interface: NodeAssoc
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.

Specified by:
buildAssociation in interface NodeAssoc
See Also:
#setName(String)

getNodeAssocRef

public AssociationRef getNodeAssocRef(QNameDAO qnameDAO)
Description copied from interface: NodeAssoc
Convenience method to retrieve the association's reference

Specified by:
getNodeAssocRef in interface NodeAssoc
Parameters:
qnameDAO - helper DAO
Returns:
the association's reference

getTypeQName

public QName getTypeQName(QNameDAO qnameDAO)
Description copied from interface: NodeAssoc
Convenience method to retrieve the association's type QName

Specified by:
getTypeQName in interface NodeAssoc
Parameters:
qnameDAO - helper DAO
Returns:
the association's type QName

setTypeQName

public void setTypeQName(QNameDAO qnameDAO,
                         QName typeQName)
Description copied from interface: NodeAssoc
Convenience method to set the association's type

Specified by:
setTypeQName in interface NodeAssoc
Parameters:
qnameDAO - the helper DAO
typeQName - the association's type QName

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getId

public java.lang.Long getId()
Specified by:
getId in interface NodeAssoc

getVersion

public java.lang.Long getVersion()
Specified by:
getVersion in interface NodeAssoc
Returns:
Returns the current version number

getSource

public Node getSource()
Specified by:
getSource in interface NodeAssoc

getTarget

public Node getTarget()
Specified by:
getTarget in interface NodeAssoc

getTypeQNameId

public java.lang.Long getTypeQNameId()
Specified by:
getTypeQNameId in interface NodeAssoc
Returns:
Returns the type of the association

setTypeQNameId

public void setTypeQNameId(java.lang.Long typeQNameId)
Specified by:
setTypeQNameId in interface NodeAssoc
Parameters:
typeQNameId - the association's dictionary type


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