12-15-2009 08:47 AM
/**
* Sets the number of duplicates on each duplicate node with the given
* hashsum.
*
* @param storeRef
* @param hashSum
* @param deletedNode
* the number will not be set on this node. If null it is
* ignored.
*/
void setOthersForHashsum(StoreRef storeRef, String hashSum,
NodeRef deletedNode) {
ResultSet rs = searchService.query(storeRef, "lucene",
"@dup\\:hashsum:" + hashSum);
if (logger.isDebugEnabled())
logger.debug("Found " + rs.length() + " equals for hashsum " + hashSum);
List<NodeRef> nodeRefs = rs.getNodeRefs();
if (deletedNode != null) {
int l = nodeRefs.size();
for (int i = 0; i < l; i++)
if (nodeRefs.get(i).getId().equals(deletedNode.getId())) {
nodeRefs.remove(i);
break;
}
}
int duplicateCount = nodeRefs.size() - 1;
for (NodeRef current : nodeRefs)
if (nodeService.exists(current))
nodeService.setProperty(current, PROP_COUNT, duplicateCount);
rs.close();
rs = null;
}
12-17-2009 01:27 AM
12-17-2009 02:22 AM
12-17-2009 10:01 AM
12-23-2009 12:42 AM
12-23-2009 03:44 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.