Class DefaultPrPaginationService

java.lang.Object
de.hybris.platform.partyroleservices.service.impl.DefaultPrPaginationService
All Implemented Interfaces:
PrPaginationService

public class DefaultPrPaginationService extends Object implements PrPaginationService
Default implementation of PrPaginationService.
Since:
2205
  • Constructor Details

    • DefaultPrPaginationService

      public DefaultPrPaginationService()
  • Method Details

    • checkOffset

      public Integer checkOffset(Integer inputOffset)
      Description copied from interface: PrPaginationService
      Checks if the given offset is valid
      Specified by:
      checkOffset in interface PrPaginationService
      Parameters:
      inputOffset - the offset set by the user.
      Returns:
      offset if given value is correct; 0 otherwise.
    • checkLimit

      public Integer checkLimit(Integer inputLimit)
      Description copied from interface: PrPaginationService
      Checks if the given limit is valid
      Specified by:
      checkLimit in interface PrPaginationService
      Parameters:
      inputLimit - the limit set by the user.
      Returns:
      limit if input value is correct; 100 otherwise (PAGINATION_DEFAULT_LIMIT)
    • addEntryWithPaginationDetails

      public void addEntryWithPaginationDetails(org.springframework.util.MultiValueMap<String,String> header, String url, String queryStringWithoutParams, Long totalCount, Integer limit, Integer offset)
      Description copied from interface: PrPaginationService
      Adds entry with pagination details to the header.
      Specified by:
      addEntryWithPaginationDetails in interface PrPaginationService
      Parameters:
      header - The header that will be used in response.
      url - The Url of the http request.
      queryStringWithoutParams - The url string without the offset and limit params
      totalCount - The total number of resources of the requested type that exist in the system.
      limit - The limit represents the number of entries that will be selected for the result list.
      offset - The offset represents the position in list from where the result list will start.