Class OffsetBasedPagination
- java.lang.Object
-
- fr.gouv.vitam.ihmdemo.common.pagination.OffsetBasedPagination
-
public class OffsetBasedPagination extends java.lang.Object
Offset-based pagination using HTTP Headers
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
HEADER_LIMIT
static java.lang.String
HEADER_OFFSET
static java.lang.String
HEADER_TOTAL
-
Constructor Summary
Constructors Constructor Description OffsetBasedPagination()
Empty Pagination ConstructorOffsetBasedPagination(int offset, int limit)
OffsetBasedPagination(int offset, int limit, int total)
OffsetBasedPagination(javax.servlet.http.HttpServletRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLimit()
int
getOffset()
int
getTotal()
OffsetBasedPagination
setLimit(int limit)
OffsetBasedPagination
setOffset(int offset)
OffsetBasedPagination
setTotal(int total)
-
-
-
Field Detail
-
HEADER_LIMIT
public static final java.lang.String HEADER_LIMIT
- See Also:
- Constant Field Values
-
HEADER_OFFSET
public static final java.lang.String HEADER_OFFSET
- See Also:
- Constant Field Values
-
HEADER_TOTAL
public static final java.lang.String HEADER_TOTAL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OffsetBasedPagination
public OffsetBasedPagination()
Empty Pagination Constructor
-
OffsetBasedPagination
public OffsetBasedPagination(javax.servlet.http.HttpServletRequest request) throws VitamException
- Parameters:
request
-- Throws:
VitamException
-
OffsetBasedPagination
public OffsetBasedPagination(int offset, int limit)
- Parameters:
offset
-limit
-
-
OffsetBasedPagination
public OffsetBasedPagination(int offset, int limit, int total)
- Parameters:
offset
-limit
-total
-
-
-
Method Detail
-
getOffset
public int getOffset()
- Returns:
- the offset
-
setOffset
public OffsetBasedPagination setOffset(int offset)
- Parameters:
offset
- the offset to set- Returns:
- this
-
getLimit
public int getLimit()
- Returns:
- the limit
-
setLimit
public OffsetBasedPagination setLimit(int limit)
- Parameters:
limit
- the limit to set- Returns:
- this
-
getTotal
public int getTotal()
- Returns:
- the total
-
setTotal
public OffsetBasedPagination setTotal(int total)
- Parameters:
total
- the total to set- Returns:
- this
-
-