Interface ProductProjectionPagedSearchResponse
- All Superinterfaces:
ResourcePagedQueryResponse<ProductProjection>
The response returned to a Product Projection Search request. The object contains the query results with Product Projections where at least one ProductVariant matches the search query, as well as the facet results, if requested.
Example to create an instance using the builder pattern
ProductProjectionPagedSearchResponse productProjectionPagedSearchResponse = ProductProjectionPagedSearchResponse.builder()
.limit(0.3)
.offset(0.3)
.count(0.3)
.plusResults(resultsBuilder -> resultsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductProjectionPagedSearchResponsebuilder(ProductProjectionPagedSearchResponse template) create builder for ProductProjectionPagedSearchResponse instancecopyDeep()deepCopy(ProductProjectionPagedSearchResponse template) factory method to create a deep copy of ProductProjectionPagedSearchResponse@NotNull LonggetCount()Actual number of results returned.@Valid FacetResultsFacet results for each facet expression specified in the search request.@NotNull LonggetLimit()The maximum number of results returned on a page.@NotNull LongThe starting point for the retrieved paginated result.@NotNull @Valid List<ProductProjection>ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}and/orfilter.queryorfilterquery parameter.getTotal()Total number of results matching the query.of()factory methodof(ProductProjectionPagedSearchResponse template) factory method to create a shallow copy ProductProjectionPagedSearchResponsevoidActual number of results returned.voidsetFacets(FacetResults facets) Facet results for each facet expression specified in the search request.voidThe maximum number of results returned on a page.voidThe starting point for the retrieved paginated result.voidsetResults(ProductProjection... results) ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}and/orfilter.queryorfilterquery parameter.voidsetResults(List<ProductProjection> results) ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}and/orfilter.queryorfilterquery parameter.voidTotal number of results matching the query.static com.fasterxml.jackson.core.type.TypeReference<ProductProjectionPagedSearchResponse>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.ResourcePagedQueryResponse
getPageIndex, getTotalPages, head, isFirst, isLast
-
Method Details
-
getLimit
The maximum number of results returned on a page.
- Specified by:
getLimitin interfaceResourcePagedQueryResponse<ProductProjection>- Returns:
- limit
-
getOffset
The starting point for the retrieved paginated result.
- Specified by:
getOffsetin interfaceResourcePagedQueryResponse<ProductProjection>- Returns:
- offset
-
getCount
Actual number of results returned.
- Specified by:
getCountin interfaceResourcePagedQueryResponse<ProductProjection>- Returns:
- count
-
getTotal
Long getTotal()Total number of results matching the query.
- Specified by:
getTotalin interfaceResourcePagedQueryResponse<ProductProjection>- Returns:
- total
-
getResults
ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}and/orfilter.queryorfilterquery parameter. If the query parametermarkMatchingVariants=truewas provided with the request, the matching variants are marked as such.- Specified by:
getResultsin interfaceResourcePagedQueryResponse<ProductProjection>- Returns:
- results
-
getFacets
Facet results for each facet expression specified in the search request.
Only present if at least one
facetparameter was provided with the search request.- Returns:
- facets
-
setLimit
The maximum number of results returned on a page.
- Parameters:
limit- value to be set
-
setOffset
The starting point for the retrieved paginated result.
- Parameters:
offset- value to be set
-
setCount
Actual number of results returned.
- Parameters:
count- value to be set
-
setTotal
Total number of results matching the query.
- Parameters:
total- value to be set
-
setResults
ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}and/orfilter.queryorfilterquery parameter. If the query parametermarkMatchingVariants=truewas provided with the request, the matching variants are marked as such.- Parameters:
results- values to be set
-
setResults
ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}and/orfilter.queryorfilterquery parameter. If the query parametermarkMatchingVariants=truewas provided with the request, the matching variants are marked as such.- Parameters:
results- values to be set
-
setFacets
Facet results for each facet expression specified in the search request.
Only present if at least one
facetparameter was provided with the search request.- Parameters:
facets- value to be set
-
of
factory method- Returns:
- instance of ProductProjectionPagedSearchResponse
-
of
factory method to create a shallow copy ProductProjectionPagedSearchResponse- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductProjectionPagedSearchResponse copyDeep() -
deepCopy
@Nullable static ProductProjectionPagedSearchResponse deepCopy(@Nullable ProductProjectionPagedSearchResponse template) factory method to create a deep copy of ProductProjectionPagedSearchResponse- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductProjectionPagedSearchResponse- Returns:
- builder
-
builder
static ProductProjectionPagedSearchResponseBuilder builder(ProductProjectionPagedSearchResponse template) create builder for ProductProjectionPagedSearchResponse instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductProjectionPagedSearchResponse
default <T> T withProductProjectionPagedSearchResponse(Function<ProductProjectionPagedSearchResponse, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<ProductProjectionPagedSearchResponse> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-