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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe category in which the related product is placed.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.getId()The context ID of the relationship.The product to promote.The promotion message for this relation.Whether the persistent counterpart to thisPromotionalCategoryProducthas a non-default value forSortable.getSorting(), which determines order in admin list grids and ordering ofPromotionalCategoryProductsthat appear in customer-facing frontend views driven byPromotionalCategoryProduct.inthashCode()voidsetCategory(CategoryRef category) The category in which the related product is placed.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidThe context ID of the relationship.voidsetPromotionalProduct(Product promotionalProduct) The product to promote.voidsetPromotionalProductType(String promotionalProductType) voidsetPromotionMessage(String promotionMessage) The promotion message for this relation.voidWhether the persistent counterpart to thisPromotionalCategoryProducthas a non-default value forSortable.getSorting(), which determines order in admin list grids and ordering ofPromotionalCategoryProductsthat appear in customer-facing frontend views driven byPromotionalCategoryProduct.toString()
-
Constructor Details
-
PromotionalCategoryProduct
public PromotionalCategoryProduct()
-
-
Method Details
-
getId
The context ID of the relationship.- Returns:
- the context ID of the relationship
-
getCategory
The category in which the related product is placed.- Returns:
- the category in which the related product is placed
-
getPromotionalProduct
The product to promote.- Returns:
- the promotional product
-
getPromotionalProductType
- Returns:
- the type of relation between the category and the related product
- See Also:
-
getSorted
Whether the persistent counterpart to thisPromotionalCategoryProducthas a non-default value forSortable.getSorting(), which determines order in admin list grids and ordering ofPromotionalCategoryProductsthat appear in customer-facing frontend views driven byPromotionalCategoryProduct.- Specified by:
getSortedin interfacecom.broadleafcommerce.data.tracking.core.sort.business.domain.Sorted- Returns:
- Whether the persistent counterpart to this
PromotionalCategoryProducthas a non-default value forSortable.getSorting(). - See Also:
-
Sorted.getSorted()Sortable
-
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 ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setId
The context ID of the relationship.- Parameters:
id- the context ID of the relationship
-
setCategory
The category in which the related product is placed.- Parameters:
category- the category in which the related product is placed
-
setPromotionalProduct
The product to promote.- Parameters:
promotionalProduct- the promotional product
-
setPromotionalProductType
- Parameters:
promotionalProductType- the type of relation between the category and the related product- See Also:
-
setSorted
Whether the persistent counterpart to thisPromotionalCategoryProducthas a non-default value forSortable.getSorting(), which determines order in admin list grids and ordering ofPromotionalCategoryProductsthat appear in customer-facing frontend views driven byPromotionalCategoryProduct.- Parameters:
sorted- Whether the persistent counterpart to thisPromotionalCategoryProducthas a non-default value forSortable.getSorting().- See Also:
-
Sorted.getSorted()Sortable
-
setPromotionMessage
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 ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-