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
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getId()
Product IDcom.fasterxml.jackson.databind.node.ObjectNode
GeneralObjectNode
representing the majority of this Product's JSON structure.com.broadleafcommerce.pricing.client.domain.PriceInfo
The 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 thePriceInfo
for the Variant with that SKU.List ofTranslations
associated with this Product.int
hashCode()
void
Product IDvoid
setJsonMap
(com.fasterxml.jackson.databind.node.ObjectNode jsonMap) GeneralObjectNode
representing the majority of this Product's JSON structure.void
setPriceInfo
(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo) The PriceInfo associated with this product, or null.void
setProductRating
(RatingSummary productRating) The overall rating for this product.void
setSkuInventory
(Map<String, Long> skuInventory) Map of SKU to available inventory.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 thePriceInfo
for the Variant with that SKU.void
setTranslations
(List<Translation> translations) List ofTranslations
associated with this Product.toString()
-
Constructor Details
-
CollectedProduct
public CollectedProduct()
-
-
Method Details
-
getJsonMap
public com.fasterxml.jackson.databind.node.ObjectNode getJsonMap()GeneralObjectNode
representing 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 ofTranslations
associated 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 thePriceInfo
for the Variant with that SKU. If this product has no Variants, or if there is noPriceInfo
assigned to a Variant then there will be no entry in this Map for that SKU and the Product'sPriceInfo
should 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:
getPriceInfo
in interfacePriceable
- Returns:
- The
PriceInfo
on the entity.
-
setId
Product ID -
setJsonMap
public void setJsonMap(com.fasterxml.jackson.databind.node.ObjectNode jsonMap) GeneralObjectNode
representing 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 ofTranslations
associated 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 thePriceInfo
for the Variant with that SKU. If this product has no Variants, or if there is noPriceInfo
assigned to a Variant then there will be no entry in this Map for that SKU and the Product'sPriceInfo
should 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:
setPriceInfo
in interfacePriceable
- Parameters:
priceInfo
- ThePriceInfo
to set.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getId
Product ID- Specified by:
getId
in interfaceCollectedEntity<String>
- Returns:
- The ID of the collected entity
-