Package com.commercetools.api.models
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 TypeMethodDescriptiongetCount()
getLimit()
default Long
Calculates the page number of the result, the pages are indexed staring 0, which means thatgetPageIndex()
returns a value in [0,n) , given 'n' is the total number of pagesgetTotal()
default Long
Calculates the total number of pages matching the request.head()
Tries to access the first element of the result list.default boolean
isFirst()
Checks if this is the first page of a result.default boolean
isLast()
Checks if it is the last possible page.
-
Method Details
-
getLimit
Long getLimit() -
getCount
Long getCount() -
getTotal
Long getTotal() -
getOffset
Long getOffset() -
getResults
-
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
Calculates the page number of the result, the pages are indexed staring 0, which means thatgetPageIndex()
returns a value in [0,n) , given 'n' is the total number of pages- Returns:
- the page number of the result
-
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.
-