Class ResultSetManagement

    • Method Detail

      • nextPage

        public final ResultSetManagement nextPage​(int max)
        Creates the result set request for the next page. It requires that this result set management has a "last item" set, otherwise the last page is requested.
        Parameters:
        max - The number of items in the page.
        Returns:
        The result set management for requesting the next page.
      • previousPage

        public final ResultSetManagement previousPage​(int max)
        Creates the result set request for the previous page. It requires that this result set management has a "first item" set, otherwise the first page is requested.
        Parameters:
        max - The number of items in the page.
        Returns:
        The result set management for requesting the previous page.
      • forLimit

        public static ResultSetManagement forLimit​(int limit,
                                                   int index)
        Gets a result set, which starts at a particular index.
        Parameters:
        limit - The item count per page.
        index - The index to start from.
        Returns:
        The result set.
        See Also:
        2.6 Retrieving a Page Out of Order
      • forCountResponse

        public static ResultSetManagement forCountResponse​(int count)
        Gets a result set, which has a count information. The result set is intended for the response.
        Parameters:
        count - The item count per page.
        Returns:
        The result set.
        See Also:
        2.6 Retrieving a Page Out of Order
      • forResponse

        public static ResultSetManagement forResponse​(Integer count,
                                                      Integer index,
                                                      String first,
                                                      String last)
        Gets a result set, which has a count information, including first and last item. The result set is intended for the response.
        Parameters:
        count - The item count per page.
        index - The index of the first item.
        first - The first item.
        last - The last item.
        Returns:
        The result set.
        See Also:
        2.2 Paging Forwards Through a Result Set
      • forItemCount

        public static ResultSetManagement forItemCount()
        Gets a result set, which gets the item count of a result without retrieving the items themselves.
        Returns:
        The result set.
        See Also:
        2.7 Getting the Item Count
      • getItemCount

        public final Integer getItemCount()
        Gets the item count of a result set.
        Returns:
        The item count.
      • getFirstItem

        public final String getFirstItem()
        Gets the first item.
        Returns:
        The first item.
      • getFirstItemIndex

        public final Integer getFirstItemIndex()
        Gets the first item's index.
        Returns:
        The first item's index.
      • getLastItem

        public final String getLastItem()
        Gets the last item.
        Returns:
        The last item.
      • getMaxSize

        public final Integer getMaxSize()
        Gets the max size.
        Returns:
        The max size.
      • getAfter

        public final String getAfter()
        Gets the 'after' element.
        Returns:
        The 'after' element.
      • getBefore

        public final String getBefore()
        Gets the 'before' element.
        Returns:
        The 'before' element.
      • getIndex

        public final Integer getIndex()
        Gets the index.
        Returns:
        The index.
      • isRequestingCount

        public final boolean isRequestingCount()
        Indicates, whether this RSM is used for requesting the item count.
        Returns:
        True, if this RSM is used for requesting the item count.