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

130502 gjames: SEARCH-114: Switching to use limit rather then maxItems for searchparameters


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@132136 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-11-03 13:10:18 +00:00
parent 5abba74783
commit 3fabbb3c59

View File

@@ -127,7 +127,7 @@ public class SearchMapper
//Hardcode workspace store
sp.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
sp.setLimitBy(LimitBy.FINAL_SIZE);
sp.setMaxItems(100);
sp.setLimit(100);
}
/**
@@ -169,7 +169,7 @@ public class SearchMapper
if (paging != null)
{
sp.setLimitBy(LimitBy.FINAL_SIZE);
sp.setMaxItems(paging.getMaxItems());
sp.setLimit(paging.getMaxItems());
sp.setSkipCount(paging.getSkipCount());
}
}
@@ -443,14 +443,14 @@ public class SearchMapper
{
if (limits.getPermissionEvaluationCount() != null)
{
sp.setMaxItems(-1);
sp.setLimit(-1);
sp.setLimitBy(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS);
sp.setMaxPermissionChecks(limits.getPermissionEvaluationCount());
}
if (limits.getPermissionEvaluationTime() != null)
{
sp.setMaxItems(-1);
sp.setLimit(-1);
sp.setLimitBy(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS);
sp.setMaxPermissionCheckTimeMillis(limits.getPermissionEvaluationTime());
}