Class PaginationParameters
java.lang.Object
de.hybris.platform.integrationservices.search.PaginationParameters
Specifies page parameters for retrieving items stored in the platform. It can be used for reading items in
batches (pages), where
getPageSize() specifies items per page and getPageStart() specifies how many items should
be skipped and not included in the page result.-
Method Summary
Modifier and TypeMethodDescriptionstatic PaginationParameterscreate(int start, int size) Creates new instance ofPaginationParameterswith specified characteristics.booleanintRetrieves number of items to return in the search result.intRetrieves number of items to be skipped in the result set.inthashCode()toString()
-
Method Details
-
create
Creates new instance ofPaginationParameterswith specified characteristics.- Parameters:
start- specifies position of the first item to be returned in the search result within the search result set. For example, if there are 200 items in the persistent storage and this parameter is equal to 100, then first 100 items will be skipped and the result will contain items beginning from the 100th item.Any negative or zero value means the result should not skip items and that it will contain items beginning from the very first item in the result set.
size- number of items to include in the result set. Any negative number is treated as0.This parameter allows to limit number of items returned, so that the application would not attempt to load too many items matching the search criteria into the memory and result in the
OutOfMemoryError.- Returns:
- a value object with the specified parameters.
-
getPageStart
public int getPageStart()Retrieves number of items to be skipped in the result set.- Returns:
- requested items will be read from the persistent storage, then, if offset is greater than
0, theoffsetnumber of items at the beginning of the result set will be removed. - See Also:
-
getPageSize
public int getPageSize()Retrieves number of items to return in the search result.- Returns:
- number of items to be retrieved. The search result may contain fewer number of items or maybe even not items, but it should not contain more items then the page size specified.
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-