Class PageableUtil

java.lang.Object
net.croz.nrich.search.api.util.PageableUtil

public final class PageableUtil extends Object
Util class for converting paging and sort properties to Pageable instances. Unique sort property is here since some databases do not guarantee consistent paging if sorting by non unique properties, it is defined also as a separate arguments since it probably won't be sent from client.
  • Method Details

    • convertToPageable

      public static org.springframework.data.domain.Pageable convertToPageable(SortablePageableRequest request, SortProperty uniqueSortProperty)
    • convertToPageable

      public static org.springframework.data.domain.Pageable convertToPageable(SortablePageableRequest request)
    • convertToPageable

      public static org.springframework.data.domain.Pageable convertToPageable(Integer pageNumber, Integer pageSize)
    • convertToPageable

      public static org.springframework.data.domain.Pageable convertToPageable(Integer pageNumber, Integer pageSize, SortProperty uniqueSortProperty)
    • convertToPageable

      public static org.springframework.data.domain.Pageable convertToPageable(Integer pageNumber, Integer pageSize, List<SortProperty> sortPropertyList)
    • convertToPageable

      public static org.springframework.data.domain.Pageable convertToPageable(Integer pageNumber, Integer pageSize, SortProperty uniqueSortProperty, List<SortProperty> sortPropertyList)