mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-4352 : F99 alien invasion - node service call for selecting children where a property = value
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21855 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2527,6 +2527,35 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
|
||||
parentNodeId, assocTypeQName, childNames,
|
||||
new ChildAssocRefBatchingQueryCallback(resultsCallback));
|
||||
}
|
||||
|
||||
public void getChildAssocsByPropertyValue(
|
||||
Long parentNodeId,
|
||||
QName propertyQName,
|
||||
Serializable value,
|
||||
ChildAssocRefQueryCallback resultsCallback)
|
||||
{
|
||||
PropertyDefinition propertyDef = dictionaryService.getProperty(propertyQName);
|
||||
NodePropertyValue nodeValue = nodePropertyHelper.makeNodePropertyValue(propertyDef, value);
|
||||
|
||||
if(nodeValue != null)
|
||||
{
|
||||
switch (nodeValue.getPersistedType())
|
||||
{
|
||||
case 3: // long
|
||||
case 5: // double
|
||||
case 6: // string
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new IllegalArgumentException("method not supported for persisted value type " + nodeValue.getPersistedType());
|
||||
}
|
||||
|
||||
selectChildAssocsByPropertyValue(parentNodeId,
|
||||
propertyQName,
|
||||
nodeValue,
|
||||
new ChildAssocRefBatchingQueryCallback(resultsCallback));
|
||||
}
|
||||
}
|
||||
|
||||
public void getChildAssocsByChildTypes(
|
||||
Long parentNodeId,
|
||||
@@ -3173,6 +3202,11 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
|
||||
QName assocTypeQName,
|
||||
Collection<String> childNames,
|
||||
ChildAssocRefQueryCallback resultsCallback);
|
||||
protected abstract void selectChildAssocsByPropertyValue(
|
||||
Long parentNodeId,
|
||||
QName propertyQName,
|
||||
NodePropertyValue nodeValue,
|
||||
ChildAssocRefQueryCallback resultsCallback);
|
||||
protected abstract void selectChildAssocsByChildTypes(
|
||||
Long parentNodeId,
|
||||
Set<QName> childNodeTypeQNames,
|
||||
|
Reference in New Issue
Block a user