Class PromotionalProduct

java.lang.Object
com.broadleafcommerce.catalog.domain.PromotionalProduct
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, com.broadleafcommerce.data.tracking.core.sort.business.domain.Sorted, Serializable

public class PromotionalProduct extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware, com.broadleafcommerce.data.tracking.core.sort.business.domain.Sorted

A join entity that associates Products to each other in a many to many relationship, including additional information about the association.

Author:
Samarth Dhruva (samarthd)
See Also:
  • Constructor Details

    • PromotionalProduct

      public PromotionalProduct()
  • Method Details

    • getId

      public String getId()
      The context ID of the promotional product.
      Returns:
      the context ID of the promotional product
    • getProductId

      public String getProductId()
      The context ID of the owning product of this association.
      Returns:
      the context ID of the product
    • getRelatedProduct

      public Product getRelatedProduct()
      The underlying Product that is being associated to as the actual promotional product.
      Returns:
      the related product
    • getType

      public String getType()
      Returns:
      the type of relation between these two products
      See Also:
    • getPromotionMessage

      public String getPromotionMessage()
      The promotion message for this relation.
      Returns:
      the promotion message for this relation
    • getSorted

      public Boolean getSorted()
      Whether the persistent counterpart to this PromotionalProduct has a non-default value for Sortable.getSorting(), which determines order in admin list grids and ordering of PromotionalProducts that appear in customer-facing frontend views driven by PromotionalProduct.
      Specified by:
      getSorted in interface com.broadleafcommerce.data.tracking.core.sort.business.domain.Sorted
      Returns:
      Whether the persistent counterpart to this PromotionalProduct has a non-default value for Sortable.getSorting().
      See Also:
      • Sorted.getSorted()
      • Sortable
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The context ID of the promotional product.
      Parameters:
      id - the context ID of the promotional product
    • setProductId

      public void setProductId(String productId)
      The context ID of the owning product of this association.
      Parameters:
      productId - the context ID of the product
    • setRelatedProduct

      public void setRelatedProduct(Product relatedProduct)
      The underlying Product that is being associated to as the actual promotional product.
      Parameters:
      relatedProduct - the related product
    • setType

      public void setType(String type)
      Parameters:
      type - the type of relation between these two products
      See Also:
    • setPromotionMessage

      public void setPromotionMessage(String promotionMessage)
      The promotion message for this relation.
      Parameters:
      promotionMessage - the promotion message for this relation
    • setSorted

      public void setSorted(Boolean sorted)
      Whether the persistent counterpart to this PromotionalProduct has a non-default value for Sortable.getSorting(), which determines order in admin list grids and ordering of PromotionalProducts that appear in customer-facing frontend views driven by PromotionalProduct.
      Parameters:
      sorted - Whether the persistent counterpart to this PromotionalProduct has a non-default value for Sortable.getSorting().
      See Also:
      • Sorted.getSorted()
      • Sortable
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • 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