Class ProductSearchFacetStatsValueBuilder
- All Implemented Interfaces:
Builder<ProductSearchFacetStatsValue>
Example to create an instance using the builder pattern
ProductSearchFacetStatsValue productSearchFacetStatsValue = ProductSearchFacetStatsValue.builder()
.name("{name}")
.field("{field}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSearchFacetStatsValue with checking for non-null required valuesbuilds ProductSearchFacetStatsValue without checking for non-null required valuesThe searchable Product field to facet on.fieldType
(SearchFieldType fieldType) If thefield
is not standard, this must be the Attribute type.filter
(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.getField()
The searchable Product field to facet on.If thefield
is not standard, this must be the Attribute type.Additional filtering expression to apply to the search result before calculating the facet.getName()
Name of the stats facet to appear in the ProductSearchFacetResultStats.getScope()
Whether the facet must consider only the Products resulting from the search (query
) or all the Products (all
).Name of the stats facet to appear in the ProductSearchFacetResultStats.of()
factory method for an instance of ProductSearchFacetStatsValueBuilderof
(ProductSearchFacetStatsValue template) create builder for ProductSearchFacetStatsValue 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
-
ProductSearchFacetStatsValueBuilder
public ProductSearchFacetStatsValueBuilder()
-
-
Method Details
-
name
Name of the stats facet to appear in the ProductSearchFacetResultStats.
- 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 ProductSearchFacetStatsValueBuilder 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 ProductSearchFacetStatsValueBuilder 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
-
field
The searchable Product field to facet on.
- Parameters:
field
- value to be set- Returns:
- Builder
-
fieldType
If the
field
is not standard, this must be the Attribute type.- Parameters:
fieldType
- value to be set- Returns:
- Builder
-
getName
Name of the stats facet to appear in the ProductSearchFacetResultStats.
- 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
-
getField
The searchable Product field to facet on.
- Returns:
- field
-
getFieldType
If the
field
is not standard, this must be the Attribute type.- Returns:
- fieldType
-
build
builds ProductSearchFacetStatsValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSearchFacetStatsValue>
- Returns:
- ProductSearchFacetStatsValue
-
buildUnchecked
builds ProductSearchFacetStatsValue without checking for non-null required values- Returns:
- ProductSearchFacetStatsValue
-
of
factory method for an instance of ProductSearchFacetStatsValueBuilder- Returns:
- builder
-
of
create builder for ProductSearchFacetStatsValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-