Class QueryParams<T extends QueryField>
- java.lang.Object
-
- org.alfresco.module.org_alfresco_module_rm.util.dao.QueryParams<T>
-
@AlfrescoPublicApi public class QueryParams<T extends QueryField> extends Object
Options when listing something.- Since:
- 2.6
- Author:
- Tom Page
-
-
Constructor Summary
Constructors Constructor Description QueryParams(List<org.alfresco.util.Pair<T,Boolean>> sortProps)
Constructor that takes the sort order.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxItems()
Get the total number of items to return (assuming enough are available).int
getSkipCount()
Get the number of items to skip before creating the list.List<org.alfresco.util.Pair<T,Boolean>>
getSortProps()
Get the ordered list of columns to sort on (and their sort direction).void
setSortProps(List<org.alfresco.util.Pair<T,Boolean>> sortProps)
Sets the sort properties required and validates the list.QueryParams<T>
withMaxItems(int maxItems)
Sets the max items count required.QueryParams<T>
withSkipCount(int skipCount)
Sets the skip count required.QueryParams<T>
withSortProps(List<org.alfresco.util.Pair<T,Boolean>> sortProps)
Sets the sort properties required.
-
-
-
Method Detail
-
withSkipCount
public QueryParams<T> withSkipCount(int skipCount)
Sets the skip count required.
-
withMaxItems
public QueryParams<T> withMaxItems(int maxItems)
Sets the max items count required.
-
withSortProps
public QueryParams<T> withSortProps(List<org.alfresco.util.Pair<T,Boolean>> sortProps)
Sets the sort properties required.- Parameters:
sortProps
- A list of pairs of properties and sort directions.- Returns:
- The updated QueryParams object.
-
setSortProps
public void setSortProps(List<org.alfresco.util.Pair<T,Boolean>> sortProps)
Sets the sort properties required and validates the list.- Parameters:
sortProps
- A list of pairs of properties and sort directions.
-
getSortProps
public List<org.alfresco.util.Pair<T,Boolean>> getSortProps()
Get the ordered list of columns to sort on (and their sort direction).
-
getSkipCount
public int getSkipCount()
Get the number of items to skip before creating the list.
-
getMaxItems
public int getMaxItems()
Get the total number of items to return (assuming enough are available).
-
-