Fix for ALF-9086 "RINF 52: Lucene Removal: Fix FileFolderService search methods"

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29546 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2011-08-04 12:31:45 +00:00
parent 4b507ee7d8
commit 7d30b7b050
13 changed files with 311 additions and 38 deletions

View File

@@ -153,6 +153,7 @@ public class GetChildrenCannedQuery extends AbstractCannedQueryPermissions<NodeR
// Get filter details
Set<QName> childNodeTypeQNames = paramBean.getChildTypeQNames();
final List<FilterProp> filterProps = paramBean.getFilterProps();
String pattern = paramBean.getPattern();
// Get sort details
CannedQuerySortDetails sortDetails = parameters.getSortDetails();
@@ -190,6 +191,19 @@ public class GetChildrenCannedQuery extends AbstractCannedQueryPermissions<NodeR
}
}
if (pattern != null)
{
// TODO, check that we should be tied to the content model in this way. Perhaps a configurable property
// name against which compare the pattern?
Pair<Long, QName> nameQName = qnameDAO.getQName(ContentModel.PROP_NAME);
if(nameQName == null)
{
throw new AlfrescoRuntimeException("Unable to determine qname id of name property");
}
params.setNamePropertyQNameId(nameQName.getFirst());
params.setPattern(pattern);
}
final List<NodeRef> result;
if (filterSortPropCnt > 0)