Class JdbcResultPage<T>

java.lang.Object
com.northconcepts.datapipeline.foundations.jdbc.JdbcResultPage<T>

public class JdbcResultPage<T> extends Object
One page of query results: its rows plus the page number, page size and total row count.
  • Constructor Details

    • JdbcResultPage

      public JdbcResultPage(int pageSize, int page, List<T> content, long total)
      Creates a page holding content, the rows of the 0-based page, out of total rows overall.
  • Method Details

    • getPageSize

      public int getPageSize()
    • setPageSize

      public JdbcResultPage<T> setPageSize(int pageSize)
    • getPage

      public int getPage()
      Returns the 0-based page number.
    • setPage

      public JdbcResultPage<T> setPage(int page)
      Sets the 0-based page number.
    • getTotal

      public long getTotal()
      Returns the total number of rows across all pages.
    • setTotal

      public JdbcResultPage<T> setTotal(long total)
      Sets the total number of rows across all pages.
    • getContent

      public List<T> getContent()
    • setContent

      public JdbcResultPage<T> setContent(List<T> content)
    • hasNext

      public boolean hasNext()
    • hasPrevious

      public boolean hasPrevious()
    • getTotalPages

      public int getTotalPages()
      Returns the number of pages needed for the total rows at this page size, rounded up.