Class VariantAvailabilityInfo

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

public class VariantAvailabilityInfo extends Object implements Serializable
Minimal representation of the inventory availability information for a Variant. Used by ProductAvailabilityIndex.
Since:
Catalog Browse Service 2.2.0, Release Train 2.3.0
Author:
Nathan Moore (nathandmoore)
See Also:
  • Constructor Details

    • VariantAvailabilityInfo

      public VariantAvailabilityInfo()
  • Method Details

    • getId

      public String getId()
      The unique identifier for the variant.
      Returns:
      the context ID of the variant
    • getSku

      public String getSku()
      SKU code for the particular variant.
      Returns:
      the SKU code for the variant
    • getOptionValues

      public Map<String,String> getOptionValues()
      Map of option attribute names to a corresponding option value. This makes a particular variant uniquely identifiable across multiple variants for the same product.
      Returns:
      a map of option attribute names to a corresponding option value
    • isAvailable

      public boolean isAvailable()
      Whether the variant has inventory available by sku.
    • setId

      public void setId(String id)
      The unique identifier for the variant.
      Parameters:
      id - the context ID of the variant
    • setSku

      public void setSku(String sku)
      SKU code for the particular variant.
      Parameters:
      sku - the SKU code for the variant
    • setOptionValues

      public void setOptionValues(Map<String,String> optionValues)
      Map of option attribute names to a corresponding option value. This makes a particular variant uniquely identifiable across multiple variants for the same product.
      Parameters:
      optionValues - a map of option attribute names to a corresponding option value
    • setAvailable

      public void setAvailable(boolean available)
      Whether the variant has inventory available by sku.
    • 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