Another lookup cache checkpoint.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4407 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-11-21 01:46:55 +00:00
parent 837095a411
commit 75f3c91b12
5 changed files with 124 additions and 4 deletions

View File

@@ -84,6 +84,31 @@ class Lookup
*/
private boolean fNeedsCopying;
public Lookup(Lookup other, AVMNodeDAO nodeDAO, AVMStoreDAO storeDAO)
{
fAVMStore = storeDAO.getByName(other.fAVMStore.getName());
fStoreName = fAVMStore.getName();
fComponents = new ArrayList<LookupComponent>();
fLayeredYet = other.fLayeredYet;
if (other.fTopLayer != null)
{
fTopLayer = (LayeredDirectoryNode)nodeDAO.getByID(other.fTopLayer.getId());
}
fPosition = other.fPosition;
fTopLayerIndex = other.fTopLayerIndex;
fLowestLayerIndex = other.fLowestLayerIndex;
fNeedsCopying = other.fNeedsCopying;
fDirectlyContained = other.fDirectlyContained;
for (LookupComponent comp : other.fComponents)
{
LookupComponent newComp = new LookupComponent();
newComp.setName(comp.getName());
newComp.setIndirection(comp.getIndirection());
newComp.setNode(nodeDAO.getByID(comp.getNode().getId()));
fComponents.add(newComp);
}
}
/**
* Create a new one.
* @param store The AVMStore that's being looked in.