Got rid of parent member of AVMNodes. Duplicated data unnecessarily.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3136 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-06-18 17:03:49 +00:00
parent c892c5a4b5
commit 606096011c
6 changed files with 1 additions and 60 deletions

View File

@@ -45,11 +45,6 @@ abstract class AVMNodeImpl implements AVMNode, Serializable
*/
private AVMNode fMergedFrom;
/**
* The parent of this.
*/
private DirectoryNode fParent;
/**
* The Repository that owns this.
*/
@@ -94,7 +89,6 @@ abstract class AVMNodeImpl implements AVMNode, Serializable
fVersionID = -1;
fAncestor = null;
fMergedFrom = null;
fParent = null;
fRepository = repo;
fIsRoot = false;
long time = System.currentTimeMillis();
@@ -143,25 +137,6 @@ abstract class AVMNodeImpl implements AVMNode, Serializable
return fMergedFrom;
}
/**
* Get the canonical parent of this node. This parent
* is the one under which this node was created.
* @return The canonical parent.
*/
public DirectoryNode getParent()
{
return fParent;
}
/**
* Set the canonical parent of this node.
* @param parent The canonical parent.
*/
public void setParent(DirectoryNode parent)
{
fParent = parent;
}
/**
* Perform a copy on write on this node and recursively
* up to the repository root. This is a template method
@@ -183,7 +158,7 @@ abstract class AVMNodeImpl implements AVMNode, Serializable
newMe.setVersionID(repos.getNextVersionID());
// Get our parent directory if we have one.
DirectoryNode parent = null;
if (getParent() != null)
if (!getIsRoot())
{
parent = (DirectoryNode)lPath.getCurrentNode();
}
@@ -193,7 +168,6 @@ abstract class AVMNodeImpl implements AVMNode, Serializable
DirectoryNode newParent =
(DirectoryNode)parent.copyOnWrite(lPath);
newParent.putChild(myName, newMe);
newMe.setParent(newParent);
}
else // Null parent means root of repository.
{