Merged DEV/CHECK_EXISTS to HEAD

svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/DEV/CHECK_EXISTS@3442 svn://www.alfresco.org:3691/alfresco/BRANCHES/DEV/CHECK_EXISTS@3590 .

TODO: Fix bug raising incorrect exception during UI paste of same-named file
Note:
- Added a new method to NodeService to get child by name
- Added a new method to FileFolderService to perform fast, direct lookups based on name


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3591 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-08-23 16:50:12 +00:00
parent 3c9f179571
commit 4e4e342409
39 changed files with 1577 additions and 637 deletions

View File

@@ -38,6 +38,8 @@ public class ChildAssocImpl implements ChildAssoc, Serializable
private Node parent;
private Node child;
private QName typeQName;
private String childNodeName;
private long childNodeNameCrc;
private QName qName;
private boolean isPrimary;
private int index;
@@ -60,15 +62,11 @@ public class ChildAssocImpl implements ChildAssoc, Serializable
// add the forward associations
this.setParent(parentNode);
this.setChild(childNode);
// add the inverse associations
parentNode.getChildAssocs().add(this);
childNode.getParentAssocs().add(this);
}
public void removeAssociation()
{
// maintain inverse assoc from parent node to this instance
this.getParent().getChildAssocs().remove(this);
// maintain inverse assoc from child node to this instance
this.getChild().getParentAssocs().remove(this);
}
@@ -128,7 +126,8 @@ public class ChildAssocImpl implements ChildAssoc, Serializable
sb.append("ChildAssoc")
.append("[ parent=").append(parent)
.append(", child=").append(child)
.append(", name=").append(getQname())
.append(", child name crc=").append(childNodeNameCrc)
.append(", assoc name=").append(getQname())
.append(", isPrimary=").append(isPrimary)
.append("]");
return sb.toString();
@@ -281,6 +280,26 @@ public class ChildAssocImpl implements ChildAssoc, Serializable
}
}
public String getChildNodeName()
{
return childNodeName;
}
public void setChildNodeName(String childNodeName)
{
this.childNodeName = childNodeName;
}
public long getChildNodeNameCrc()
{
return childNodeNameCrc;
}
public void setChildNodeNameCrc(long crc)
{
this.childNodeNameCrc = crc;
}
public QName getQname()
{
return qName;