Class HateoasOffsetPaginatedResponse<T>

java.lang.Object
com.helixframework.api.contract.HateoasResponse
com.helixframework.api.contract.HateoasOffsetPaginatedResponse<T>
Type Parameters:
T - item type

public class HateoasOffsetPaginatedResponse<T> extends HateoasResponse
API response that returns a collection with offset pagination and HATEOS links.
  • Constructor Details

    • HateoasOffsetPaginatedResponse

      public HateoasOffsetPaginatedResponse()
      Creates an instance of HateoasOffsetPaginatedResponse.
    • HateoasOffsetPaginatedResponse

      public HateoasOffsetPaginatedResponse(long offset, long limit, Collection<T> items)
      Creates an instance of HateoasOffsetPaginatedResponse without links.
      Parameters:
      offset - page offset
      limit - page limit
      items - items to return in response
    • HateoasOffsetPaginatedResponse

      public HateoasOffsetPaginatedResponse(long offset, long limit, Collection<T> items, Map<String,HalLink> links)
      Creates an instance of HateoasOffsetPaginatedResponse with links.
      Parameters:
      offset - page offset
      limit - page limit
      items - items to return in response
      links - hateoas links
  • Method Details

    • getCount

      public int getCount()
      Gets the number of items in the collection.
      Returns:
      number of items in the collection
    • getOffset

      public Long getOffset()
      Gets the pagination offset. The total number of records to offset before beginning to return results.
      Returns:
      pagination offset
    • getLimit

      public Long getLimit()
      Gets the page limit. The total number of results to return.
      Returns:
      page limit
    • getItems

      public List<T> getItems()
      Gets the items.
      Returns:
      items