Class ProductFilterResult


  • public class ProductFilterResult
    extends java.lang.Object
    The result you get when you have applied a product filter. It contains the list of the filtered products and also a list of all possible attribute values for these products.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProductFilterResult​(java.util.List<ProductModel> products, java.util.List<FilterAttribute> filteredAttributes, int totalCount)
      Initializes a result with a list of products and a list of possible filter attributes.
    • Constructor Detail

      • ProductFilterResult

        public ProductFilterResult​(java.util.List<ProductModel> products,
                                   java.util.List<FilterAttribute> filteredAttributes,
                                   int totalCount)
        Initializes a result with a list of products and a list of possible filter attributes.
    • Method Detail

      • getProducts

        public java.util.List<ProductModel> getProducts()
        Returns the list of the filtered products.
        Returns:
        the list of the filtered products
      • getFilteredAttributes

        public java.util.List<FilterAttribute> getFilteredAttributes()
        A list of possible attribute values for the filtered products. Each item represents a classifcation attribute and a list of possible values, but only those values that can be found in the filtered products. Values that have been used in the filter are marked with a flag. You can use this information to construct a new filter with which you can further drill down the result, e.g. with a funnel search.
        Returns:
        a list of possible filter attributes
        See Also:
        FilterAttribute, FilterAttributeValue
      • getCount

        public int getCount()
        The number of elements in the result list. This may be less that the total count if you have limited the result list.
        Returns:
        the number of elements in the result list
      • getTotalCount

        public int getTotalCount()
        The total number of products for the filter. This may be more than the count if you have limited the result lost
        Returns:
        the total number of products for the filter