Class ProductAvailabilityIndex

java.lang.Object
com.broadleafcommerce.catalogbrowse.domain.ProductAvailabilityIndex
All Implemented Interfaces:
Serializable

public class ProductAvailabilityIndex extends Object implements Serializable
DTO to hold the basic necessary information for a product's related variants and their inventory availability. This is used to improve performance and reduce payload size to the frontend, especially when a given product has many variants.
Since:
Catalog Browse Service 2.2.0, Release Train 2.3.0
Author:
Susana Cruz (susanaccruz)
See Also:
  • Constructor Details

    • ProductAvailabilityIndex

      public ProductAvailabilityIndex()
  • Method Details

    • getVariants

      public Map<String,VariantAvailabilityInfo> getVariants()
      A map that holds product's related variants, where the key is the unique identifier for the variant and the value represents a minimal version of the Variant object with minimal data required for commerce flows.
      Returns:
      a map that holds the product's related variants
    • setVariants

      public void setVariants(Map<String,VariantAvailabilityInfo> variants)
      A map that holds product's related variants, where the key is the unique identifier for the variant and the value represents a minimal version of the Variant object with minimal data required for commerce flows.
      Parameters:
      variants - a map that holds the product's related variants
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object