Class FacetTermBuilder
java.lang.Object
com.commercetools.api.models.product.FacetTermBuilder
- Direct Known Subclasses:
FacetResultTermBuilder
FacetTermBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
FacetTerm facetTerm = FacetTerm.builder()
.count(0.3)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds FacetTerm with checking for non-null required valuesbuilds FacetTerm without checking for non-null required valuesNumber of ProductVariants for which theterm
applies.getCount()
Number of ProductVariants for which theterm
applies.Number of Products for which theterm
applies.getTerm()
Value for the field specified in the term facet expression for which at least one ProductVariant could be found.static FacetTermBuilder
of()
factory method for an instance of FacetTermBuilderstatic FacetTermBuilder
create builder for FacetTerm instanceproductCount
(Long productCount) Number of Products for which theterm
applies.Value for the field specified in the term facet expression for which at least one ProductVariant could be found.
-
Constructor Details
-
FacetTermBuilder
public FacetTermBuilder()
-
-
Method Details
-
term
Value for the field specified in the term facet expression for which at least one ProductVariant could be found.
- Parameters:
term
- value to be set- Returns:
- Builder
-
count
Number of ProductVariants for which the
term
applies.- Parameters:
count
- value to be set- Returns:
- Builder
-
productCount
Number of Products for which the
term
applies. Only available if thecounting products
extension is enabled.- Parameters:
productCount
- value to be set- Returns:
- Builder
-
getTerm
Value for the field specified in the term facet expression for which at least one ProductVariant could be found.
- Returns:
- term
-
getCount
Number of ProductVariants for which the
term
applies.- Returns:
- count
-
getProductCount
Number of Products for which the
term
applies. Only available if thecounting products
extension is enabled.- Returns:
- productCount
-
build
builds FacetTerm with checking for non-null required values -
buildUnchecked
builds FacetTerm without checking for non-null required values- Returns:
- FacetTerm
-
of
factory method for an instance of FacetTermBuilder- Returns:
- builder
-
of
create builder for FacetTerm instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-