Class PromotionalCategoryProduct

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

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

A join entity that associates Categories to Products in a many to many relationship, with additional marketing-related information about the association.

This relationship is different from CategoryProduct, as it is marketing-focused and has different properties and scale characteristics.

This relationship only applies when the category product membership type is CategoryProductMembershipType.EXPLICIT.

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

    • PromotionalCategoryProduct

      public PromotionalCategoryProduct()
  • Method Details

    • getId

      public String getId()
      The context ID of the relationship.
      Returns:
      the context ID of the relationship
    • getCategory

      public CategoryRef getCategory()
      The category in which the related product is placed.
      Returns:
      the category in which the related product is placed
    • getPromotionalProduct

      public Product getPromotionalProduct()
      The product to promote.
      Returns:
      the promotional product
    • getPromotionalProductType

      public String getPromotionalProductType()
      Returns:
      the type of relation between the category and the related product
      See Also:
    • getSorted

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

      public String getPromotionMessage()
      The promotion message for this relation.
      Returns:
      the promotion message for this relation
    • 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 relationship.
      Parameters:
      id - the context ID of the relationship
    • setCategory

      public void setCategory(CategoryRef category)
      The category in which the related product is placed.
      Parameters:
      category - the category in which the related product is placed
    • setPromotionalProduct

      public void setPromotionalProduct(Product promotionalProduct)
      The product to promote.
      Parameters:
      promotionalProduct - the promotional product
    • setPromotionalProductType

      public void setPromotionalProductType(String promotionalProductType)
      Parameters:
      promotionalProductType - the type of relation between the category and the related product
      See Also:
    • setSorted

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

      public void setPromotionMessage(String promotionMessage)
      The promotion message for this relation.
      Parameters:
      promotionMessage - the promotion message for this relation
    • 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