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
public class PageableBase extends Object implements Pageable
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
equals(Object o)
int
getLimit()
Total of rows that are returned.long
getOffset()
Defines how many items to skip before beginning to return rows.int
hashCode()
void
setLimit(int limit)
void
setOffset(long offset)
String
toString()
-
-
-
Method Detail
-
getLimit
public int getLimit()
Total of rows that are returned.
-
setLimit
public void setLimit(int limit)
- Parameters:
limit
- the non negative limit to set- Throws:
IllegalArgumentException
- if negative
-
getOffset
public long getOffset()
Defines how many items to skip before beginning to return rows.
-
setOffset
public void setOffset(long offset)
- Parameters:
offset
- the non negative offset to set- Throws:
IllegalArgumentException
- if negative
-
addOffset
public void addOffset(long offsetDiff)
Adds to existing offset, setting offset to zero if it would be negative.- Parameters:
offsetDiff
- to be added to existing offset.
-
copyPagingValues
public void copyPagingValues(Pageable pageable)
Utility method to copy paging values.
-
-