Package no.acntech.kollectiveq
Class Pagination
-
- All Implemented Interfaces:
public final class Pagination
Pagination 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 class
Pagination.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static Integer
DEFAULT_PAGE
public final static Integer
DEFAULT_SIZE
public final static String
PAGE_PARAM
public final static String
SIZE_PARAM
public final static String
QUERY_PARAM
private final Integer
startIndex
private final Integer
endIndex
private final Integer
offset
private final Integer
page
private final Integer
size
public final static Pagination.Companion
Companion
-
Constructor Summary
Constructors Constructor Description Pagination(Integer page, Integer size)
-
Method Summary
Modifier and Type Method Description final Integer
getStartIndex()
final Integer
getEndIndex()
final Integer
getOffset()
final Integer
getPage()
final Integer
getSize()
final String
asString()
final String
toHttpParameter()
-
-
Method Detail
-
getStartIndex
final Integer getStartIndex()
-
getEndIndex
final Integer getEndIndex()
-
toHttpParameter
final String toHttpParameter()
-
-
-
-