Class HalDataPage

All Implemented Interfaces:
Serializable, Cloneable, Iterable<HalData>, Collection<HalData>, List<HalData>, RandomAccess, SequencedCollection<HalData>

public class HalDataPage extends ArrayList<HalData>
In case the a paginated result set is expected when querying the HalClient, then a HalDataPage will be returned containing the the HalData instances correlating to the requested page as well as additional information about the number of total pages available. Paginated result sets may be expected when calling methods such as HalClient.readPage(String, int, int) or HalClient.readAll(String, org.refcodes.web.FormFields) (or similar) with HTTP-Query-Fields querying a paginated result.
See Also:
  • Field Details

  • Constructor Details

    • HalDataPage

      protected HalDataPage()
      Default constructor for usage by sub-classes.
    • HalDataPage

      public HalDataPage(int aPageNumber, int aPageSize, int aPageCount)
      Constructs the HalDataPage instances with the given pagination metrics.
      Parameters:
      aPageNumber - The page's number as of pagination.
      aPageSize - The page's size as of pagination.
      aPageCount - The total page count of the overall result set.
  • Method Details

    • getPageNumber

      public int getPageNumber()
      Returns the number of the page which this HalDataPage instances represents.
      Returns:
      The HalDataPage result set's page number as of pagination.
    • getPageSize

      public int getPageSize()
      Returns the maximum size of the page being requested for the HalDataPage result set. Returns -1 in case no page size has been specified.
      Returns:
      The HalDataPage result set's page size as of pagination.
    • getPageCount

      public int getPageCount()
      Returns the total number of the pages which are available for retrieval.
      Returns:
      The total number of the pages representing the overall result set..