Expose database unique node ID as a spoofed property. This can be used as an alternative to the UUID for local uniqueness.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3115 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-06-15 14:39:15 +00:00
parent 46e178a215
commit 1eb9d806b4
5 changed files with 18 additions and 2 deletions

View File

@@ -770,7 +770,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
ret.put(propertyQName, value);
}
// spoof referencable properties
addReferencableProperties(nodeRef, ret);
addReferencableProperties(nodeRef, node.getId(), ret);
// done
return ret;
}
@@ -793,6 +793,12 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
// get the property from the node
Node node = getNodeNotNull(nodeRef);
if (qname.equals(ContentModel.PROP_NODE_DBID))
{
return node.getId();
}
Map<QName, PropertyValue> properties = node.getProperties();
PropertyValue propertyValue = properties.get(qname);