Fixed SAIL-384: HEAD merge fallout: CMIS TCK

- Implemented NodeService.getAssoc(id)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20939 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-07-05 14:04:36 +00:00
parent ca5fa3a973
commit b59b9604e9
7 changed files with 72 additions and 14 deletions

View File

@@ -26,6 +26,10 @@ package org.alfresco.repo.domain.node;
import java.util.List;
import org.alfresco.repo.domain.qname.QNameDAO;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.namespace.QName;
/**
* Bean for <b>alf_node_assoc</b> table.
*
@@ -61,6 +65,20 @@ public class NodeAssocEntity
.append("]");
return sb.toString();
}
/**
* Helper method to fetch the association reference
*/
public AssociationRef getAssociationRef(QNameDAO qnameDAO)
{
QName assocTypeQName = qnameDAO.getQName(typeQNameId).getSecond();
AssociationRef assocRef = new AssociationRef(
id,
sourceNode.getNodeRef(),
assocTypeQName,
targetNode.getNodeRef());
return assocRef;
}
public Long getId()
{