mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-7167 (RINF 11)
- minor: paging request defaults (handle in one place - for example skip count should never be negative) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28561 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -167,20 +167,8 @@ public class GetChildrenCannedQueryFactory extends AbstractCannedQueryFactory<No
|
|||||||
// specific query params - context (parent) and inclusive filters (child types, property values)
|
// specific query params - context (parent) and inclusive filters (child types, property values)
|
||||||
GetChildrenCannedQueryParams paramBean = new GetChildrenCannedQueryParams(tenantService.getName(parentRef), childTypeQNames, filterProps);
|
GetChildrenCannedQueryParams paramBean = new GetChildrenCannedQueryParams(tenantService.getName(parentRef), childTypeQNames, filterProps);
|
||||||
|
|
||||||
int skipCount = pagingRequest.getSkipCount();
|
|
||||||
if (skipCount == -1)
|
|
||||||
{
|
|
||||||
skipCount = CannedQueryPageDetails.DEFAULT_SKIP_RESULTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
int maxItems = pagingRequest.getMaxItems();
|
|
||||||
if (maxItems == -1)
|
|
||||||
{
|
|
||||||
maxItems = CannedQueryPageDetails.DEFAULT_PAGE_SIZE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// page details
|
// page details
|
||||||
CannedQueryPageDetails cqpd = new CannedQueryPageDetails(skipCount, maxItems, CannedQueryPageDetails.DEFAULT_PAGE_NUMBER, CannedQueryPageDetails.DEFAULT_PAGE_COUNT);
|
CannedQueryPageDetails cqpd = new CannedQueryPageDetails(pagingRequest.getSkipCount(), pagingRequest.getMaxItems(), CannedQueryPageDetails.DEFAULT_PAGE_NUMBER, CannedQueryPageDetails.DEFAULT_PAGE_COUNT);
|
||||||
|
|
||||||
// sort details
|
// sort details
|
||||||
CannedQuerySortDetails cqsd = null;
|
CannedQuerySortDetails cqsd = null;
|
||||||
|
Reference in New Issue
Block a user