Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

105524: Merged 5.0.N (5.0.3) to HEAD-BUG-FIX (5.1/Cloud)
      105458: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.3)
         105368: Merged DEV to V4.2-BUG-FIX (4.2.5)
            105328: MNT-14021 : Request to optimize db query performance when retrieving the trashcan item
               - applied limit to "select_GetArchivedNodesCannedQuery" query to optimize the general performance of the trashcan


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@105587 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tatyana Valkevych
2015-06-05 11:01:39 +00:00
parent d97044ae94
commit 96e195b9fb
3 changed files with 35 additions and 0 deletions

View File

@@ -74,6 +74,9 @@ public class GetArchivedNodesCannedQuery extends AbstractCannedQueryPermissions<
return Collections.emptyList();
}
int resultsRequired = parameters.getResultsRequired();
paramBean.setLimit(resultsRequired);
// note: refer to SQL for specific DB filtering and sorting
List<ArchivedNodeEntity> results = cannedQueryDAO.executeQuery(QUERY_NAMESPACE,
QUERY_SELECT_GET_ARCHIVED_NODES, paramBean, 0, Integer.MAX_VALUE);

View File

@@ -28,6 +28,8 @@ package org.alfresco.repo.node.archive;
public class GetArchivedNodesCannedQueryParams extends ArchivedNodeEntity
{
private int limit;
/**
* @param parentNodeId
* @param assocTypeQNameId
@@ -43,4 +45,33 @@ public class GetArchivedNodesCannedQueryParams extends ArchivedNodeEntity
super(parentNodeId, nameQNameId, filter, assocTypeQNameId, sortOrderAscending,
filterIgnoreCase);
}
/**
* @param parentNodeId
* @param assocTypeQNameId
* @param filter
* @param filterIgnoreCase
* @param nameQNameId
* @param sortOrderAscending
* @param limit
*/
public GetArchivedNodesCannedQueryParams(Long parentNodeId, Long assocTypeQNameId,
String filter, Boolean filterIgnoreCase, Long nameQNameId, Boolean sortOrderAscending,
int limit)
{
this(parentNodeId, assocTypeQNameId, filter, filterIgnoreCase, nameQNameId,
sortOrderAscending);
this.setLimit(limit);
}
public int getLimit()
{
return limit;
}
public void setLimit(int limit)
{
this.limit = limit;
}
}