Class SortParamSupport


  • public class SortParamSupport
    extends Object
    Supports converting a Pageable to its String-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