Package org.gbif.api.model.common.paging
Class PageableBase
java.lang.Object
org.gbif.api.model.common.paging.PageableBase
- All Implemented Interfaces:
Pageable
- Direct Known Subclasses:
DescriptorGroupSearchRequest
,DescriptorSearchRequest
,PagingRequest
,PagingResponse
,RequestSearchParams
,SearchRequest
Generically is a class that contains attributes used by operations that are aware of pagination.
Its properties are final to allow calculations in other setter methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gbif.api.model.common.paging.Pageable
Pageable.OffsetLimitParameters
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOffset
(long offsetDiff) Adds to existing offset, setting offset to zero if it would be negative.void
copyPagingValues
(Pageable pageable) Utility method to copy paging values.boolean
int
getLimit()
Total of rows that are returned.long
Defines how many items to skip before beginning to return rows.int
hashCode()
void
setLimit
(int limit) void
setOffset
(long offset) toString()
-
Method Details
-
getLimit
Total of rows that are returned. -
setLimit
- Parameters:
limit
- the non negative limit to set- Throws:
IllegalArgumentException
- if negative
-
getOffset
Defines how many items to skip before beginning to return rows. -
setOffset
- Parameters:
offset
- the non negative offset to set- Throws:
IllegalArgumentException
- if negative
-
addOffset
Adds to existing offset, setting offset to zero if it would be negative.- Parameters:
offsetDiff
- to be added to existing offset.
-
copyPagingValues
Utility method to copy paging values. -
equals
-
hashCode
-
toString
-