Interface FacetTerm

All Known Subinterfaces:
FacetResultTerm

public interface FacetTerm
FacetTerm
Example to create an instance using the builder pattern

     FacetTerm facetTerm = FacetTerm.builder()
             .count(0.3)
             .build()
 
  • Method Details

    • getTerm

      @NotNull @NotNull Object getTerm()

      Value for the field specified in the term facet expression for which at least one ProductVariant could be found. For AttributeNumberType Attributes, numeric values are returned as decimals, for example 1.0 instead of 1.

      Returns:
      term
    • getCount

      @NotNull @NotNull Long getCount()

      Number of ProductVariants for which the term applies.

      Returns:
      count
    • getProductCount

      Long getProductCount()

      Number of Products for which the term applies. Only available if the counting products extension is enabled.

      Returns:
      productCount
    • setTerm

      void setTerm(Object term)

      Value for the field specified in the term facet expression for which at least one ProductVariant could be found. For AttributeNumberType Attributes, numeric values are returned as decimals, for example 1.0 instead of 1.

      Parameters:
      term - value to be set
    • setCount

      void setCount(Long count)

      Number of ProductVariants for which the term applies.

      Parameters:
      count - value to be set
    • setProductCount

      void setProductCount(Long productCount)

      Number of Products for which the term applies. Only available if the counting products extension is enabled.

      Parameters:
      productCount - value to be set
    • of

      static FacetTerm of()
      factory method
      Returns:
      instance of FacetTerm
    • of

      static FacetTerm of(FacetTerm template)
      factory method to create a shallow copy FacetTerm
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      FacetTerm copyDeep()
    • deepCopy

      @Nullable static FacetTerm deepCopy(@Nullable FacetTerm template)
      factory method to create a deep copy of FacetTerm
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static FacetTermBuilder builder()
      builder factory method for FacetTerm
      Returns:
      builder
    • builder

      static FacetTermBuilder builder(FacetTerm template)
      create builder for FacetTerm instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withFacetTerm

      default <T> T withFacetTerm(Function<FacetTerm,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<FacetTerm> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference