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

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130502 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2016-09-09 07:55:05 +00:00
parent fe2c13ce03
commit 44f2d7136e

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());
}