Class PromotionalProduct
java.lang.Object
com.broadleafcommerce.catalogbrowse.domain.PromotionalProduct
- All Implemented Interfaces:
Priceable,Serializable
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String name, Object value) Takes in any additional attributes passed in the request not matching any defined properties.protected booleanbooleanReturn any additional attributes passed in the request not matching any defined properties.Map holding any additional attributes passed in the request not matching any defined properties.com.broadleafcommerce.pricing.client.domain.PriceInfoRetrieves thePriceInfoon the entity.The product being promoted.getType()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.voidThe type of the promotional product such as UP_SALE and CROSS_SALE.toString()
-
Constructor Details
-
PromotionalProduct
public PromotionalProduct()
-
-
Method Details
-
addAttribute
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
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
The product being promoted.- Returns:
- The product being promoted
-
getType
The type of the promotional product such as UP_SALE and CROSS_SALE.- Returns:
- the type of relation between these two products
-
getAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setRelatedProduct
The product being promoted.- Parameters:
promotionalProduct- The product being promoted
-
setType
The type of the promotional product such as UP_SALE and CROSS_SALE.- Parameters:
type- the type of relation between these two products
-
setAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-