mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged searchrep (5.2.1) to 5.2.N (5.2.1)
136941 msuzuki: Search-340, added date parsing to range git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137072 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -71,46 +71,7 @@ public class RangeResultMapper
|
||||
}
|
||||
return ffcs;
|
||||
}
|
||||
private static boolean isRangeStartInclusive(List<String> values)
|
||||
{
|
||||
if(values != null && !values.isEmpty())
|
||||
{
|
||||
for(String startInc : values)
|
||||
switch (startInc)
|
||||
{
|
||||
case "upper":
|
||||
return false;
|
||||
case "outer":
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
private static boolean isRangeEndInclusive(List<String> endIncs)
|
||||
{
|
||||
if(endIncs != null && !endIncs.isEmpty())
|
||||
{
|
||||
for(String endInc : endIncs)
|
||||
{
|
||||
switch (endInc)
|
||||
{
|
||||
case "upper":
|
||||
return true;
|
||||
case "edge":
|
||||
return true;
|
||||
case "outer":
|
||||
return true;
|
||||
case "all":
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the generic facet response out of range results.
|
||||
* @param facetField
|
||||
@@ -131,8 +92,8 @@ public class RangeResultMapper
|
||||
List<String> includes = range.getInclude();
|
||||
if(includes != null && !includes.isEmpty())
|
||||
{
|
||||
startInclusive = isRangeStartInclusive(includes);
|
||||
endInclusive = isRangeEndInclusive(includes);
|
||||
startInclusive = range.isRangeStartInclusive();
|
||||
endInclusive = range.isRangeEndInclusive();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user