Class PaginationParameters
- java.lang.Object
-
- de.hybris.platform.integrationservices.search.PaginationParameters
-
public class PaginationParameters extends java.lang.ObjectSpecifies page parameters for retrieving items stored in the platform. It can be used for reading items in batches (pages), wheregetPageSize()specifies items per page andgetPageStart()specifies how many items should be skipped and not included in the page result.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PaginationParameterscreate(int start, int size)Creates new instance ofPaginationParameterswith specified characteristics.booleanequals(java.lang.Object o)intgetPageSize()Retrieves number of items to return in the search result.intgetPageStart()Retrieves number of items to be skipped in the result set.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
create
public static PaginationParameters create(int start, int size)
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:
create(int, int)
-
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:
create(int, int)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-