org.alfresco.repo.domain
Interface ChildAssoc

All Superinterfaces:
java.lang.Comparable
All Known Implementing Classes:
ChildAssocImpl

public interface ChildAssoc
extends java.lang.Comparable

Represents a special type of association between nodes, that of the parent-child relationship.


Method Summary
 void buildAssociation(Node parentNode, Node childNode)
          Performs the necessary work on the provided nodes to ensure that a bidirectional association is properly set up.
 Node getChild()
           
 ChildAssociationRef getChildAssocRef(QNameDAO qnameDAO)
          A convenience method to get a reference to this association.
 java.lang.String getChildNodeName()
           
 long getChildNodeNameCrc()
           
 java.lang.Long getId()
           
 int getIndex()
           
 boolean getIsPrimary()
           
 Node getParent()
           
 QName getQName(QNameDAO qnameDAO)
          A convenience method to aggregate the qualified name's namespace and localname into a single qualified name.
 long getQnameCrc()
           
 java.lang.String getQnameLocalName()
           
 java.lang.Long getQnameNamespaceId()
           
 QName getTypeQName(QNameDAO qnameDAO)
          Convenience method to get the association's type
 java.lang.Long getTypeQNameId()
           
 java.lang.Long getVersion()
           
 void removeAssociation()
          Performs the necessary work on the parent and child nodes to maintain the inverse association sets
 void setChildNodeName(java.lang.String childNodeName)
           
 void setChildNodeNameCrc(long crc)
           
 void setIndex(int index)
          Set the index of this association
 void setIsPrimary(boolean isPrimary)
           
 void setQName(QNameDAO qnameDAO, QName qname)
          Convenience method to set the association's qname
 void setQnameCrc(long crc)
           
 void setQnameLocalName(java.lang.String localName)
           
 void setQnameNamespaceId(java.lang.Long namespaceId)
           
 void setTypeQName(QNameDAO qnameDAO, QName typeQName)
          Convenience method to set the association's type
 void setTypeQNameId(java.lang.Long typeQNameId)
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

buildAssociation

void buildAssociation(Node parentNode,
                      Node childNode)
Performs the necessary work on the provided nodes to ensure that a bidirectional association is properly set up.

The association attributes still have to be set up.

Parameters:
parentNode -
childNode -
See Also:
#setName(String), ChildAssoc.setIsPrimary(boolean)

removeAssociation

void removeAssociation()
Performs the necessary work on the parent and child nodes to maintain the inverse association sets


getChildAssocRef

ChildAssociationRef getChildAssocRef(QNameDAO qnameDAO)
A convenience method to get a reference to this association.

Parameters:
qnameDAO - the DAO to resolve the qname references
Returns:
Returns a reference to this association

getTypeQName

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

Parameters:
qnameDAO - the 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

getQName

QName getQName(QNameDAO qnameDAO)
A convenience method to aggregate the qualified name's namespace and localname into a single qualified name.

Returns:
Returns the qualified name of the association

setQName

void setQName(QNameDAO qnameDAO,
              QName qname)
Convenience method to set the association's qname

Parameters:
qnameDAO - the helper DAO
qname - the association's QName

getId

java.lang.Long getId()

getVersion

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

getParent

Node getParent()

getChild

Node getChild()

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

getChildNodeName

java.lang.String getChildNodeName()
Returns:
Returns the child node name. This may be truncated, in which case it will end with ...

setChildNodeName

void setChildNodeName(java.lang.String childNodeName)
Parameters:
childNodeName - the name of the child node, which may be truncated and terminated with ... in order to not exceed 50 characters.

getChildNodeNameCrc

long getChildNodeNameCrc()
Returns:
Returns the crc value for the child node name.

setChildNodeNameCrc

void setChildNodeNameCrc(long crc)
Parameters:
crc - the crc value

getQnameNamespaceId

java.lang.Long getQnameNamespaceId()
Returns:
Returns the namespace of the association's local QName

setQnameNamespaceId

void setQnameNamespaceId(java.lang.Long namespaceId)
Parameters:
namespaceId - the namespace of the association's local QName

getQnameLocalName

java.lang.String getQnameLocalName()
Returns:
Returns the localname of the association's local QName

setQnameLocalName

void setQnameLocalName(java.lang.String localName)
Parameters:
localName - the localname of the association's local QName

getQnameCrc

long getQnameCrc()
Returns:
Returns the crc value for the association's local QName

setQnameCrc

void setQnameCrc(long crc)
Parameters:
crc - the crc value

getIsPrimary

boolean getIsPrimary()

setIsPrimary

void setIsPrimary(boolean isPrimary)

getIndex

int getIndex()
Returns:
Returns the user-assigned index

setIndex

void setIndex(int index)
Set the index of this association

Parameters:
index - the association index


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