Class PaginationParameters

java.lang.Object
de.hybris.platform.integrationservices.search.PaginationParameters

public class PaginationParameters extends Object
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 Details

    • create

      public static PaginationParameters create(int start, int size)
      Creates new instance of PaginationParameters with 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 as 0.

      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, the offset number 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object