Class CollectedProduct
java.lang.Object
com.broadleafcommerce.datafeed.service.collector.domain.product.CollectedProduct
- All Implemented Interfaces:
CollectedEntity<String>,Priceable,Serializable
public class CollectedProduct
extends Object
implements CollectedEntity<String>, Serializable, Priceable
Entity that allows for flexible serialization, deserialization, and transformation of Product
data.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleangetId()Product IDcom.fasterxml.jackson.databind.node.ObjectNodeGeneralObjectNoderepresenting the majority of this Product's JSON structure.com.broadleafcommerce.pricing.client.domain.PriceInfoThe PriceInfo associated with this product, or null.The overall rating for this product.Map of SKU to available inventory.If this Product has SKUs, and if those SKUs have assigned aPriceInfo, then this Map will contain an entry where the key is the SKU and the value is thePriceInfofor the Variant with that SKU.List ofTranslationsassociated with this Product.inthashCode()voidProduct IDvoidsetJsonMap(com.fasterxml.jackson.databind.node.ObjectNode jsonMap) GeneralObjectNoderepresenting the majority of this Product's JSON structure.voidsetPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo) The PriceInfo associated with this product, or null.voidsetProductRating(RatingSummary productRating) The overall rating for this product.voidsetSkuInventory(Map<String, Long> skuInventory) Map of SKU to available inventory.voidsetSkuPrices(Map<String, com.broadleafcommerce.pricing.client.domain.PriceInfo> skuPrices) If this Product has SKUs, and if those SKUs have assigned aPriceInfo, then this Map will contain an entry where the key is the SKU and the value is thePriceInfofor the Variant with that SKU.voidsetTranslations(List<Translation> translations) List ofTranslationsassociated with this Product.toString()
-
Constructor Details
-
CollectedProduct
public CollectedProduct()
-
-
Method Details
-
getJsonMap
public com.fasterxml.jackson.databind.node.ObjectNode getJsonMap()GeneralObjectNoderepresenting the majority of this Product's JSON structure. This is intentionally not deserialized to a concrete DTO to allow for greater flexibility in implementation. -
getTranslations
List ofTranslationsassociated with this Product. -
getSkuInventory
Map of SKU to available inventory.- See Also:
-
getSkuPrices
If this Product has SKUs, and if those SKUs have assigned aPriceInfo, then this Map will contain an entry where the key is the SKU and the value is thePriceInfofor the Variant with that SKU. If this product has no Variants, or if there is noPriceInfoassigned to a Variant then there will be no entry in this Map for that SKU and the Product'sPriceInfoshould be used. -
getProductRating
The overall rating for this product.- See Also:
-
getPriceInfo
public com.broadleafcommerce.pricing.client.domain.PriceInfo getPriceInfo()The PriceInfo associated with this product, or null.- Specified by:
getPriceInfoin interfacePriceable- Returns:
- The
PriceInfoon the entity.
-
setId
Product ID -
setJsonMap
public void setJsonMap(com.fasterxml.jackson.databind.node.ObjectNode jsonMap) GeneralObjectNoderepresenting the majority of this Product's JSON structure. This is intentionally not deserialized to a concrete DTO to allow for greater flexibility in implementation. -
setTranslations
List ofTranslationsassociated with this Product. -
setSkuInventory
Map of SKU to available inventory.- See Also:
-
setSkuPrices
public void setSkuPrices(Map<String, com.broadleafcommerce.pricing.client.domain.PriceInfo> skuPrices) If this Product has SKUs, and if those SKUs have assigned aPriceInfo, then this Map will contain an entry where the key is the SKU and the value is thePriceInfofor the Variant with that SKU. If this product has no Variants, or if there is noPriceInfoassigned to a Variant then there will be no entry in this Map for that SKU and the Product'sPriceInfoshould be used. -
setProductRating
The overall rating for this product.- See Also:
-
setPriceInfo
public void setPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo) The PriceInfo associated with this product, or null.- Specified by:
setPriceInfoin interfacePriceable- Parameters:
priceInfo- ThePriceInfoto set.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getId
Product ID- Specified by:
getIdin interfaceCollectedEntity<String>- Returns:
- The ID of the collected entity
-