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:
  • Constructor Details

    • PromotionalProduct

      public PromotionalProduct()
  • Method Details

    • 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 attribute
      value - 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: Priceable
      Retrieves the PriceInfo on the entity.
      Specified by:
      getPriceInfo in interface Priceable
      Returns:
      The PriceInfo on the entity.
    • setPriceInfo

      public void setPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo)
      Description copied from interface: Priceable
      Sets the PriceInfo on the entity.
      Specified by:
      setPriceInfo in interface Priceable
      Parameters:
      priceInfo - The PriceInfo to 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.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object