Interface ResourcePagedQueryResponse<T>

All Known Subinterfaces:
ApiClientPagedQueryResponse, AssignedProductSelectionPagedQueryResponse, AssociateRolePagedQueryResponse, AttributeGroupPagedQueryResponse, BusinessUnitPagedQueryResponse, CartDiscountPagedQueryResponse, CartPagedQueryResponse, CategoryPagedQueryResponse, ChannelPagedQueryResponse, CustomerGroupPagedQueryResponse, CustomerPagedQueryResponse, CustomObjectPagedQueryResponse, DiscountCodePagedQueryResponse, ExtensionPagedQueryResponse, InventoryPagedQueryResponse, MessagePagedQueryResponse, MyPaymentPagedQueryResponse, OrderEditPagedQueryResponse, OrderPagedQueryResponse, PagedQueryResponse, PaymentPagedQueryResponse, ProductDiscountPagedQueryResponse, ProductPagedQueryResponse, ProductProjectionPagedQueryResponse, ProductProjectionPagedSearchResponse, ProductSelectionPagedQueryResponse, ProductSelectionProductPagedQueryResponse, ProductsInStorePagedQueryResponse, ProductTypePagedQueryResponse, QuotePagedQueryResponse, QuoteRequestPagedQueryResponse, ReviewPagedQueryResponse, ShippingMethodPagedQueryResponse, ShoppingListPagedQueryResponse, StagedQuotePagedQueryResponse, StandalonePricePagedQueryResponse, StatePagedQueryResponse, StorePagedQueryResponse, SubscriptionPagedQueryResponse, TaxCategoryPagedQueryResponse, TypePagedQueryResponse, ZonePagedQueryResponse

public interface ResourcePagedQueryResponse<T>
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    default Long
    Calculates the page number of the result, the pages are indexed staring 0, which means that getPageIndex() returns a value in [0,n) , given 'n' is the total number of pages
     
     
    default Long
    Calculates the total number of pages matching the request.
    default Optional<T>
    Tries to access the first element of the result list.
    default boolean
    Checks if this is the first page of a result.
    default boolean
    Checks if it is the last possible page.
  • Method Details

    • getLimit

      Long getLimit()
    • getCount

      Long getCount()
    • getTotal

      Long getTotal()
    • getOffset

      Long getOffset()
    • getResults

      List<T> getResults()
    • head

      default Optional<T> head()
      Tries to access the first element of the result list. Use case: query by slug which should contain zero or one element in the result list.
      Returns:
      the first value or absent
    • getPageIndex

      default Long getPageIndex()
      Calculates the page number of the result, the pages are indexed staring 0, which means that getPageIndex() returns a value in [0,n) , given 'n' is the total number of pages
      Returns:
      the page number of the result
    • getTotalPages

      default Long getTotalPages()
      Calculates the total number of pages matching the request.
      Returns:
      the total number of pages
    • isFirst

      default boolean isFirst()
      Checks if this is the first page of a result.
      Returns:
      true if offset is 0 otherwise false
    • isLast

      default boolean isLast()
      Checks if it is the last possible page.
      Returns:
      true if doing a request with an incremented offset parameter would cause an empty result otherwise false.