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()
          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()
          A convenience method to aggregate the qualified name's namespace and localname into a single qualified name.
 java.lang.String getQnameLocalName()
           
 NamespaceEntity getQnameNamespace()
           
 QNameEntity getTypeQName()
           
 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 setQnameLocalName(java.lang.String localName)
           
 void setQnameNamespace(NamespaceEntity namespace)
           
 void setTypeQName(QNameEntity typeQName)
           
 
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()
A convenience method to get a reference to this association.

Returns:
Returns a reference to this association

getQname

QName getQname()
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

getId

java.lang.Long getId()

getVersion

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

getParent

Node getParent()

getChild

Node getChild()

getTypeQName

QNameEntity getTypeQName()
Returns:
Returns the type of the association

setTypeQName

void setTypeQName(QNameEntity typeQName)
Parameters:
typeQName - 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

getQnameNamespace

NamespaceEntity getQnameNamespace()
Returns:
Returns the namespace of the association's local QName

setQnameNamespace

void setQnameNamespace(NamespaceEntity namespace)
Parameters:
namespace - 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

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 - 2008 Alfresco Software, Inc. All Rights Reserved.