Package no.acntech.kollectiveq
Class Pagination
-
- All Implemented Interfaces:
public final class PaginationPagination class for building and parsing pagination strings for JPA or SQL queries. The pagination string format is <code>"$page:pageValue$size:sizeValue</code> where <code>pageValue</code> and <code>sizeValue</code> are positive integers. Pagination starts at 1.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPagination.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static IntegerDEFAULT_PAGEpublic final static IntegerDEFAULT_SIZEpublic final static StringPAGE_PARAMpublic final static StringSIZE_PARAMpublic final static StringQUERY_PARAMprivate final IntegerstartIndexprivate final IntegerendIndexprivate final Integeroffsetprivate final Integerpageprivate final Integersizepublic final static Pagination.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description Pagination(Integer page, Integer size)
-
Method Summary
Modifier and Type Method Description final IntegergetStartIndex()final IntegergetEndIndex()final IntegergetOffset()final IntegergetPage()final IntegergetSize()final StringasString()final StringtoHttpParameter()-
-
Method Detail
-
getStartIndex
final Integer getStartIndex()
-
getEndIndex
final Integer getEndIndex()
-
toHttpParameter
final String toHttpParameter()
-
-
-
-