Package org.appng.api.support
Class SortParamSupport
- java.lang.Object
-
- org.appng.api.support.SortParamSupport
-
public class SortParamSupport extends Object
Supports converting aPageable
to itsString
-representation and vice versa.
The following example illustrates how this works:Sort sort = new Sort(new Order(Direction.DESC, "name"), new Order(Direction.ASC, "id")); PageRequest pageable = new PageRequest(1, 20, sort); org.junit.Assert.assertEquals("name:desc;id:asc;page:1;pageSize:20", sortParamSupport.getSortString(pageable));
- Author:
- Matthias Müller