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
- All Known Implementing Classes:
ApiClientPagedQueryResponseImpl
,AssignedProductSelectionPagedQueryResponseImpl
,AssociateRolePagedQueryResponseImpl
,AttributeGroupPagedQueryResponseImpl
,BusinessUnitPagedQueryResponseImpl
,CartDiscountPagedQueryResponseImpl
,CartPagedQueryResponseImpl
,CategoryPagedQueryResponseImpl
,ChannelPagedQueryResponseImpl
,CustomerGroupPagedQueryResponseImpl
,CustomerPagedQueryResponseImpl
,CustomObjectPagedQueryResponseImpl
,DiscountCodePagedQueryResponseImpl
,ExtensionPagedQueryResponseImpl
,InventoryPagedQueryResponseImpl
,MessagePagedQueryResponseImpl
,MyPaymentPagedQueryResponseImpl
,OrderEditPagedQueryResponseImpl
,OrderPagedQueryResponseImpl
,PagedQueryResponseImpl
,PaymentPagedQueryResponseImpl
,ProductDiscountPagedQueryResponseImpl
,ProductPagedQueryResponseImpl
,ProductProjectionPagedQueryResponseImpl
,ProductProjectionPagedSearchResponseImpl
,ProductSelectionPagedQueryResponseImpl
,ProductSelectionProductPagedQueryResponseImpl
,ProductsInStorePagedQueryResponseImpl
,ProductTypePagedQueryResponseImpl
,QuotePagedQueryResponseImpl
,QuoteRequestPagedQueryResponseImpl
,ReviewPagedQueryResponseImpl
,ShippingMethodPagedQueryResponseImpl
,ShoppingListPagedQueryResponseImpl
,StagedQuotePagedQueryResponseImpl
,StandalonePricePagedQueryResponseImpl
,StatePagedQueryResponseImpl
,StorePagedQueryResponseImpl
,SubscriptionPagedQueryResponseImpl
,TaxCategoryPagedQueryResponseImpl
,TypePagedQueryResponseImpl
,ZonePagedQueryResponseImpl
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
-
getCount
-
getTotal
-
getOffset
-
getResults
List<T> 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
Checks if this is the first page of a result.- Returns:
- true if offset is 0 otherwise false
-
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.
-