Merged searchapi (5.2.1) to 5.2.N (5.2.1)

130050 gjames: SEARCH-161: Supporting synonyms for sorting fieldNames


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130297 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2016-09-06 15:38:47 +00:00
parent 777ed4be5c
commit 04881cfa0c
4 changed files with 33 additions and 12 deletions

View File

@@ -341,7 +341,7 @@ public class NodesImpl implements Nodes
ContentModel.PROP_LOCK_OWNER,
ContentModel.PROP_WORKING_COPY_OWNER);
private final static Map<String,QName> MAP_PARAM_QNAME;
public final static Map<String,QName> PARAM_SYNONYMS_QNAME;
static
{
Map<String,QName> aMap = new HashMap<>(9);
@@ -356,7 +356,7 @@ public class NodesImpl implements Nodes
aMap.put(PARAM_SIZEINBYTES, GetChildrenCannedQuery.SORT_QNAME_CONTENT_SIZE);
aMap.put(PARAM_NODETYPE, GetChildrenCannedQuery.SORT_QNAME_NODE_TYPE);
MAP_PARAM_QNAME = Collections.unmodifiableMap(aMap);
PARAM_SYNONYMS_QNAME = Collections.unmodifiableMap(aMap);
}
// list children filtering (via where clause)
@@ -1259,7 +1259,7 @@ public class NodesImpl implements Nodes
sortProps = new ArrayList<>(sortCols.size());
for (SortColumn sortCol : sortCols)
{
QName propQname = MAP_PARAM_QNAME.get(sortCol.column);
QName propQname = PARAM_SYNONYMS_QNAME.get(sortCol.column);
if (propQname == null)
{
propQname = createQName(sortCol.column);