Class PageableDTO

java.lang.Object
info.ejava.examples.common.dto.paging.PageableDTO

public class PageableDTO extends Object
This class is responsible for serializing and deserializing a Spring Data Pageable object to/from an API. It has been mapped using Jackson JSON and XML, with a little JAXB to get it to work with WebFlux. It is designed to be an immutable object -- thus the mapping challenge is to have all properties known prior to construction.
  • Field Details

  • Constructor Details

  • Method Details

    • unpaged

      public static PageableDTO unpaged()
    • of

      public static PageableDTO of(Integer pageNumber, Integer pageSize)
    • of

      public static PageableDTO of(Integer pageNumber, Integer pageSize, org.springframework.data.domain.Sort sort)
    • of

      public static PageableDTO of(Integer pageNumber, Integer pageSize, String sortString)
    • of

      public static PageableDTO of(org.springframework.data.domain.Pageable pageable)
    • next

      public PageableDTO next()
    • previous

      public PageableDTO previous()
    • isUnpaged

      public boolean isUnpaged()
    • isPaged

      public boolean isPaged()
    • isSorted

      public boolean isSorted()
    • hasPrevious

      public boolean hasPrevious()
    • addQueryParams

      public org.springframework.web.util.UriBuilder addQueryParams(org.springframework.web.util.UriBuilder uriBuilder)
    • getQueryParams

      public org.springframework.util.MultiValueMap<String,String> getQueryParams()
    • fromPageable

      public static PageableDTO fromPageable(org.springframework.data.domain.Pageable pageable)
    • toPageable

      public org.springframework.data.domain.Pageable toPageable()
    • toSort

      public org.springframework.data.domain.Sort toSort()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toDtoFacade

      public PageableDTO.DtoFacade toDtoFacade()