Class VariantAvailabilityInfo
java.lang.Object
com.broadleafcommerce.catalogbrowse.domain.VariantAvailabilityInfo
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleangetId()The unique identifier for the variant.Map of option attribute names to a corresponding option value.getSku()SKU code for the particular variant.inthashCode()booleanWhether the variant has inventory available by sku.voidsetAvailable(boolean available) Whether the variant has inventory available by sku.voidThe unique identifier for the variant.voidsetOptionValues(Map<String, String> optionValues) Map of option attribute names to a corresponding option value.voidSKU code for the particular variant.toString()
-
Constructor Details
-
VariantAvailabilityInfo
public VariantAvailabilityInfo()
-
-
Method Details
-
getId
The unique identifier for the variant.- Returns:
- the context ID of the variant
-
getSku
SKU code for the particular variant.- Returns:
- the SKU code for the variant
-
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
The unique identifier for the variant.- Parameters:
id- the context ID of the variant
-
setSku
SKU code for the particular variant.- Parameters:
sku- the SKU code for the variant
-
setOptionValues
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
-
canEqual
-
hashCode
public int hashCode() -
toString
-