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
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The category in which the related product is placed.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information 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 thisPromotionalCategoryProduct
has a non-default value forSortable.getSorting()
, which determines order in admin list grids and ordering ofPromotionalCategoryProducts
that appear in customer-facing frontend views driven byPromotionalCategoryProduct
.int
hashCode()
void
setCategory
(CategoryRef category) The category in which the related product is placed.void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.void
The context ID of the relationship.void
setPromotionalProduct
(Product promotionalProduct) The product to promote.void
setPromotionalProductType
(String promotionalProductType) void
setPromotionMessage
(String promotionMessage) The promotion message for this relation.void
Whether the persistent counterpart to thisPromotionalCategoryProduct
has a non-default value forSortable.getSorting()
, which determines order in admin list grids and ordering ofPromotionalCategoryProducts
that 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 thisPromotionalCategoryProduct
has a non-default value forSortable.getSorting()
, which determines order in admin list grids and ordering ofPromotionalCategoryProducts
that appear in customer-facing frontend views driven byPromotionalCategoryProduct
.- Specified by:
getSorted
in interfacecom.broadleafcommerce.data.tracking.core.sort.business.domain.Sorted
- Returns:
- Whether the persistent counterpart to this
PromotionalCategoryProduct
has 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 ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information 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 thisPromotionalCategoryProduct
has a non-default value forSortable.getSorting()
, which determines order in admin list grids and ordering ofPromotionalCategoryProducts
that appear in customer-facing frontend views driven byPromotionalCategoryProduct
.- Parameters:
sorted
- Whether the persistent counterpart to thisPromotionalCategoryProduct
has 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 ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-