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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
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 promotional product.The context ID of the owning product of this association.The promotion message for this relation.The underlyingProduct
that is being associated to as the actual promotional product.Whether the persistent counterpart to thisPromotionalProduct
has a non-default value forSortable.getSorting()
, which determines order in admin list grids and ordering ofPromotionalProducts
that appear in customer-facing frontend views driven byPromotionalProduct
.getType()
int
hashCode()
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 promotional product.void
setProductId
(String productId) The context ID of the owning product of this association.void
setPromotionMessage
(String promotionMessage) The promotion message for this relation.void
setRelatedProduct
(Product relatedProduct) The underlyingProduct
that is being associated to as the actual promotional product.void
Whether the persistent counterpart to thisPromotionalProduct
has a non-default value forSortable.getSorting()
, which determines order in admin list grids and ordering ofPromotionalProducts
that appear in customer-facing frontend views driven byPromotionalProduct
.void
toString()
-
Constructor Details
-
PromotionalProduct
public PromotionalProduct()
-
-
Method Details
-
getId
The context ID of the promotional product.- Returns:
- the context ID of the promotional product
-
getProductId
The context ID of the owning product of this association.- Returns:
- the context ID of the product
-
getRelatedProduct
The underlyingProduct
that is being associated to as the actual promotional product.- Returns:
- the related product
-
getType
- Returns:
- the type of relation between these two products
- See Also:
-
getPromotionMessage
The promotion message for this relation.- Returns:
- the promotion message for this relation
-
getSorted
Whether the persistent counterpart to thisPromotionalProduct
has a non-default value forSortable.getSorting()
, which determines order in admin list grids and ordering ofPromotionalProducts
that appear in customer-facing frontend views driven byPromotionalProduct
.- Specified by:
getSorted
in interfacecom.broadleafcommerce.data.tracking.core.sort.business.domain.Sorted
- Returns:
- Whether the persistent counterpart to this
PromotionalProduct
has a non-default value forSortable.getSorting()
. - See Also:
-
Sorted.getSorted()
Sortable
-
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 promotional product.- Parameters:
id
- the context ID of the promotional product
-
setProductId
The context ID of the owning product of this association.- Parameters:
productId
- the context ID of the product
-
setRelatedProduct
The underlyingProduct
that is being associated to as the actual promotional product.- Parameters:
relatedProduct
- the related product
-
setType
- Parameters:
type
- the type of relation between these two products- See Also:
-
setPromotionMessage
The promotion message for this relation.- Parameters:
promotionMessage
- the promotion message for this relation
-
setSorted
Whether the persistent counterpart to thisPromotionalProduct
has a non-default value forSortable.getSorting()
, which determines order in admin list grids and ordering ofPromotionalProducts
that appear in customer-facing frontend views driven byPromotionalProduct
.- Parameters:
sorted
- Whether the persistent counterpart to thisPromotionalProduct
has a non-default value forSortable.getSorting()
.- See Also:
-
Sorted.getSorted()
Sortable
-
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
-