Package pro.taskana.common.rest
Class QuerySortParameter<Q extends pro.taskana.common.api.BaseQuery<?,?>,S extends QuerySortBy<Q>>
java.lang.Object
pro.taskana.common.rest.QuerySortParameter<Q,S>
- All Implemented Interfaces:
QueryParameter<Q,Void>
- Direct Known Subclasses:
ClassificationController.ClassificationQuerySortParameter,TaskCommentController.TaskCommentQuerySortParameter,TaskController.TaskQuerySortParameter,WorkbasketAccessItemController.WorkbasketAccessItemQuerySortParameter,WorkbasketController.WorkbasketQuerySortParameter
public class QuerySortParameter<Q extends pro.taskana.common.api.BaseQuery<?,?>,S extends QuerySortBy<Q>>
extends Object
implements QueryParameter<Q,Void>
-
Constructor Summary
ConstructorsConstructorDescriptionQuerySortParameter(List<S> sortBy, List<pro.taskana.common.api.BaseQuery.SortDirection> order) -
Method Summary
Modifier and TypeMethodDescriptionList<pro.taskana.common.api.BaseQuery.SortDirection>getOrder()Sort the result by a given field.static <T> voidverifyAmountOfSortByAndOrderByMatches(List<T> sortBy, List<pro.taskana.common.api.BaseQuery.SortDirection> order) static <T> voidverifyNotOnlyOrderByExists(List<T> sortBy, List<pro.taskana.common.api.BaseQuery.SortDirection> order) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pro.taskana.common.rest.QueryParameter
extractIntIntervals, extractTimeIntervals, wrapElementsInLikeStatement
-
Constructor Details
-
Method Details
-
apply
- Specified by:
applyin interfaceQueryParameter<Q extends pro.taskana.common.api.BaseQuery<?,?>, S extends QuerySortBy<Q>>
-
verifyAmountOfSortByAndOrderByMatches
public static <T> void verifyAmountOfSortByAndOrderByMatches(List<T> sortBy, List<pro.taskana.common.api.BaseQuery.SortDirection> order) throws pro.taskana.common.api.exceptions.InvalidArgumentException - Throws:
pro.taskana.common.api.exceptions.InvalidArgumentException
-
verifyNotOnlyOrderByExists
public static <T> void verifyNotOnlyOrderByExists(List<T> sortBy, List<pro.taskana.common.api.BaseQuery.SortDirection> order) throws pro.taskana.common.api.exceptions.InvalidArgumentException - Throws:
pro.taskana.common.api.exceptions.InvalidArgumentException
-
getSortBy
Sort the result by a given field. Multiple sort values can be declared. When the primary sort value is the same, the second one will be used.- Returns:
- the sort values
-
getOrder
-