Class ProductSearchFacetCountValueBuilder
- All Implemented Interfaces:
Builder<ProductSearchFacetCountValue>
Example to create an instance using the builder pattern
ProductSearchFacetCountValue productSearchFacetCountValue = ProductSearchFacetCountValue.builder()
.name("{name}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSearchFacetCountValue with checking for non-null required valuesbuilds ProductSearchFacetCountValue without checking for non-null required valuesfilter
(SearchQuery filter) Additional filtering expression to apply to the search result before calculating the facet.filter
(Function<SearchQueryBuilder, SearchQueryBuilder> builder) Additional filtering expression to apply to the search result before calculating the facet.Additional filtering expression to apply to the search result before calculating the facet.getLevel()
Specify whether to count Products (products
) or Product Variants (variants
).getName()
Name of the count facet to appear in the ProductSearchFacetResultCount.getScope()
Whether the facet must consider only the Products resulting from the search (query
) or all the Products (all
).Specify whether to count Products (products
) or Product Variants (variants
).Name of the count facet to appear in the ProductSearchFacetResultCount.of()
factory method for an instance of ProductSearchFacetCountValueBuilderof
(ProductSearchFacetCountValue template) create builder for ProductSearchFacetCountValue instancescope
(ProductSearchFacetScopeEnum scope) Whether the facet must consider only the Products resulting from the search (query
) or all the Products (all
).withFilter
(Function<SearchQueryBuilder, SearchQuery> builder) Additional filtering expression to apply to the search result before calculating the facet.
-
Constructor Details
-
ProductSearchFacetCountValueBuilder
public ProductSearchFacetCountValueBuilder()
-
-
Method Details
-
name
Name of the count facet to appear in the ProductSearchFacetResultCount.
- Parameters:
name
- value to be set- Returns:
- Builder
-
scope
Whether the facet must consider only the Products resulting from the search (
query
) or all the Products (all
).- Parameters:
scope
- value to be set- Returns:
- Builder
-
filter
public ProductSearchFacetCountValueBuilder filter(Function<SearchQueryBuilder, SearchQueryBuilder> builder) Additional filtering expression to apply to the search result before calculating the facet.
- Parameters:
builder
- function to build the filter value- Returns:
- Builder
-
withFilter
public ProductSearchFacetCountValueBuilder withFilter(Function<SearchQueryBuilder, SearchQuery> builder) Additional filtering expression to apply to the search result before calculating the facet.
- Parameters:
builder
- function to build the filter value- Returns:
- Builder
-
filter
Additional filtering expression to apply to the search result before calculating the facet.
- Parameters:
filter
- value to be set- Returns:
- Builder
-
level
Specify whether to count Products (
products
) or Product Variants (variants
).- Parameters:
level
- value to be set- Returns:
- Builder
-
getName
Name of the count facet to appear in the ProductSearchFacetResultCount.
- Returns:
- name
-
getScope
Whether the facet must consider only the Products resulting from the search (
query
) or all the Products (all
).- Returns:
- scope
-
getFilter
Additional filtering expression to apply to the search result before calculating the facet.
- Returns:
- filter
-
getLevel
Specify whether to count Products (
products
) or Product Variants (variants
).- Returns:
- level
-
build
builds ProductSearchFacetCountValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSearchFacetCountValue>
- Returns:
- ProductSearchFacetCountValue
-
buildUnchecked
builds ProductSearchFacetCountValue without checking for non-null required values- Returns:
- ProductSearchFacetCountValue
-
of
factory method for an instance of ProductSearchFacetCountValueBuilder- Returns:
- builder
-
of
create builder for ProductSearchFacetCountValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-