Added two more special purpose calls, to improve flatten performance from

rotten to ok.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3809 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-09-15 21:26:26 +00:00
parent dfe49bf51b
commit 14ebe1726f
6 changed files with 105 additions and 4 deletions

View File

@@ -832,4 +832,17 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
ChildEntry newChild = new ChildEntryImpl(name, this, node);
AVMContext.fgInstance.fChildEntryDAO.save(newChild);
}
/**
* Remove name without leaving behind a deleted node.
* @param name The name of the child to flatten.
*/
public void flatten(String name)
{
ChildEntry entry = AVMContext.fgInstance.fChildEntryDAO.getByNameParent(name, this);
if (entry != null)
{
AVMContext.fgInstance.fChildEntryDAO.delete(entry);
}
}
}