Package net.croz.nrich.search.api.util
Class PageableUtil
java.lang.Object
net.croz.nrich.search.api.util.PageableUtil
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 Summary
Modifier and TypeMethodDescriptionstatic org.springframework.data.domain.Pageable
convertToPageable
(Integer pageNumber, Integer pageSize) static org.springframework.data.domain.Pageable
convertToPageable
(Integer pageNumber, Integer pageSize, List<SortProperty> sortPropertyList) static org.springframework.data.domain.Pageable
convertToPageable
(Integer pageNumber, Integer pageSize, SortProperty uniqueSortProperty) static org.springframework.data.domain.Pageable
convertToPageable
(Integer pageNumber, Integer pageSize, SortProperty uniqueSortProperty, List<SortProperty> sortPropertyList) static org.springframework.data.domain.Pageable
convertToPageable
(SortablePageableRequest request) static org.springframework.data.domain.Pageable
convertToPageable
(SortablePageableRequest request, SortProperty uniqueSortProperty)
-
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
-
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)
-