Class PromotionalProduct
- java.lang.Object
-
- com.broadleafcommerce.catalogbrowse.domain.PromotionalProduct
-
- All Implemented Interfaces:
Priceable,Serializable
public class PromotionalProduct extends Object implements Serializable, Priceable
A structure containing all of the info necessary for a product details' related promotional product shown on a commerce-facing app (as opposed to a PIM UI).- Author:
- Nathan Moore (nathandmoore)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PromotionalProduct()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String name, Object value)Takes in any additional attributes passed in the request not matching any defined properties.protected booleancanEqual(Object other)booleanequals(Object o)Map<String,Object>getAttribute()Return any additional attributes passed in the request not matching any defined properties.Map<String,Object>getAttributes()Map holding any additional attributes passed in the request not matching any defined properties.com.broadleafcommerce.pricing.client.domain.PriceInfogetPriceInfo()Retrieves thePriceInfoon the entity.ProductgetRelatedProduct()The product being promoted.StringgetType()The type of the promotional product such as UP_SALE and CROSS_SALE.inthashCode()voidsetAttributes(Map<String,Object> attributes)Map holding any additional attributes passed in the request not matching any defined properties.voidsetPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo)Sets thePriceInfoon the entity.voidsetRelatedProduct(Product relatedProduct)The product being promoted.voidsetType(String type)The type of the promotional product such as UP_SALE and CROSS_SALE.StringtoString()
-
-
-
Method Detail
-
addAttribute
public void addAttribute(String name, Object value)
Takes in any additional attributes passed in the request not matching any defined properties.- Parameters:
name- Name of the additional attributevalue- Value of the additional attribute
-
getAttribute
public Map<String,Object> getAttribute()
Return any additional attributes passed in the request not matching any defined properties.- Returns:
- any additional attributes passed in the request not matching any defined properties.
-
getPriceInfo
public com.broadleafcommerce.pricing.client.domain.PriceInfo getPriceInfo()
Description copied from interface:PriceableRetrieves thePriceInfoon the entity.- Specified by:
getPriceInfoin interfacePriceable- Returns:
- The
PriceInfoon the entity.
-
setPriceInfo
public void setPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo)
Description copied from interface:PriceableSets thePriceInfoon the entity.- Specified by:
setPriceInfoin interfacePriceable- Parameters:
priceInfo- ThePriceInfoto set.
-
getRelatedProduct
public Product getRelatedProduct()
The product being promoted.- Returns:
- The product being promoted
-
getType
public String getType()
The type of the promotional product such as UP_SALE and CROSS_SALE.- Returns:
- the type of relation between these two products
-
getAttributes
public Map<String,Object> getAttributes()
Map holding any additional attributes passed in the request not matching any defined properties.
-
setRelatedProduct
public void setRelatedProduct(Product relatedProduct)
The product being promoted.- Parameters:
promotionalProduct- The product being promoted
-
setType
public void setType(String type)
The type of the promotional product such as UP_SALE and CROSS_SALE.- Parameters:
type- the type of relation between these two products
-
setAttributes
public void setAttributes(Map<String,Object> attributes)
Map holding any additional attributes passed in the request not matching any defined properties.
-
canEqual
protected boolean canEqual(Object other)
-
-