mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
RM-4262 Remove the ClassificationGuideQueryParams class.
We can just use the generic QueryParams class instead. Also rename SortField to QueryField, as it might later be used for e.g. filtering too.
This commit is contained in:
@@ -35,6 +35,6 @@ import org.alfresco.api.AlfrescoPublicApi;
|
||||
* @since 2.6
|
||||
*/
|
||||
@AlfrescoPublicApi
|
||||
public interface SortField
|
||||
public interface QueryField
|
||||
{
|
||||
}
|
@@ -26,7 +26,6 @@
|
||||
*/
|
||||
package org.alfresco.module.org_alfresco_module_rm.util.dao;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
@@ -41,15 +40,25 @@ import org.alfresco.util.Pair;
|
||||
* @since 2.6
|
||||
*/
|
||||
@AlfrescoPublicApi
|
||||
public class QueryParams<T extends SortField>
|
||||
public class QueryParams<T extends QueryField>
|
||||
{
|
||||
/** The ordered list of columns to sort on (and their sort direction). */
|
||||
private List<Pair<T, Boolean>> sortProps = Collections.emptyList();
|
||||
private List<Pair<T, Boolean>> sortProps;
|
||||
/** The number of items to skip before creating the list. */
|
||||
private int skipCount = 0;
|
||||
/** The total number of items to return (assuming enough are available). */
|
||||
private int maxItems = 10;
|
||||
|
||||
/**
|
||||
* Constructor that takes the sort order.
|
||||
*
|
||||
* @param sortProps A list of fields to sort on, and the direction to sort in.
|
||||
*/
|
||||
public QueryParams(List<Pair<T, Boolean>> sortProps)
|
||||
{
|
||||
setSortProps(sortProps);
|
||||
}
|
||||
|
||||
/** Sets the skip count required. */
|
||||
public QueryParams<T> withSkipCount(final int skipCount)
|
||||
{
|
||||
|
Reference in New Issue
Block a user