Class JdbcResultPage<T>
java.lang.Object
com.northconcepts.datapipeline.foundations.jdbc.JdbcResultPage<T>
One page of query results: its rows plus the page number, page size and total row count.
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcResultPage(int pageSize, int page, List<T> content, long total) Creates a page holdingcontent, the rows of the 0-basedpage, out oftotalrows overall. -
Method Summary
Modifier and TypeMethodDescriptionintgetPage()Returns the 0-based page number.intlonggetTotal()Returns the total number of rows across all pages.intReturns the number of pages needed for the total rows at this page size, rounded up.booleanhasNext()booleansetContent(List<T> content) setPage(int page) Sets the 0-based page number.setPageSize(int pageSize) setTotal(long total) Sets the total number of rows across all pages.
-
Constructor Details
-
JdbcResultPage
Creates a page holdingcontent, the rows of the 0-basedpage, out oftotalrows overall.
-
-
Method Details
-
getPageSize
public int getPageSize() -
setPageSize
-
getPage
public int getPage()Returns the 0-based page number. -
setPage
Sets the 0-based page number. -
getTotal
public long getTotal()Returns the total number of rows across all pages. -
setTotal
Sets the total number of rows across all pages. -
getContent
-
setContent
-
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.
-