Interface BaPaginationService

All Known Implementing Classes:
DefaultBaPaginationService

public interface BaPaginationService
Service handling operations for pagination.
Since:
2105
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addEntryWithPaginationDetails(org.springframework.util.MultiValueMap<String,String> header, String url, String queryStringWithoutParams, Long totalCount, Integer limit, Integer offset)
    Adds entry with pagination details to the header.
    checkLimit(Integer inputLimit)
    Method will check if the inputLimit is correct, otherwise it will return a default limit.
    checkOffset(Integer inputOffset)
    Method will check if the inputOffset is correct, otherwise it will return a default offset.
  • Method Details

    • addEntryWithPaginationDetails

      void addEntryWithPaginationDetails(org.springframework.util.MultiValueMap<String,String> header, String url, String queryStringWithoutParams, Long totalCount, Integer limit, Integer offset)
      Adds entry with pagination details to the header.
      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
      offset - The offset represents the position in list from where the result list will start.
      limit - The limit represents the number of entries that will be selected for the result list.
      totalCount - The total number of resources of the requested type that exist in the system.
    • checkOffset

      Integer checkOffset(Integer inputOffset)
      Method will check if the inputOffset is correct, otherwise it will return a default offset.
      Parameters:
      inputOffset - the offset set by the user.
      Returns:
      inputOffset if input value is correct; 0 otherwise.
    • checkLimit

      Integer checkLimit(Integer inputLimit)
      Method will check if the inputLimit is correct, otherwise it will return a default limit.
      Parameters:
      inputLimit - the limit set by the user.
      Returns:
      inputLimit if input value is correct; the DEFAULT_LIMIT value from project properties otherwise.