Class PageWrapper<T>

  • Type Parameters:
    T - is the paginated type.

    public class PageWrapper<T>
    extends Object
    "Spring Data Page interface has many nice functions to get current page number, get total pages, etc. But it’s still lack of ways to let me only display partial page range of total pagination. So I created an adapter class to wrap Spring Data Page interface with additional features."
    Author:
    ralf
    See Also:
    Java Code Geeks article
    • Field Detail

    • Constructor Detail

      • PageWrapper

        public PageWrapper​(org.springframework.data.domain.Page<T> page,
                           String url)
    • Method Detail

      • getContent

        public List<T> getContent()
      • getNumber

        public int getNumber()
      • getPage

        public org.springframework.data.domain.Page<T> getPage()
      • getSize

        public int getSize()
      • getTotalItems

        public long getTotalItems()
      • getTotalPages

        public int getTotalPages()
      • getUrl

        public String getUrl()
      • setUrl

        public void setUrl​(String url)
      • isFirstPage

        public boolean isFirstPage()
      • isHasNextPage

        public boolean isHasNextPage()
      • isHasPreviousPage

        public boolean isHasPreviousPage()
      • isLastPage

        public boolean isLastPage()