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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleancom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation 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 underlyingProductthat is being associated to as the actual promotional product.Whether the persistent counterpart to thisPromotionalProducthas a non-default value forSortable.getSorting(), which determines order in admin list grids and ordering ofPromotionalProductsthat appear in customer-facing frontend views driven byPromotionalProduct.getType()inthashCode()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 promotional product.voidsetProductId(String productId) The context ID of the owning product of this association.voidsetPromotionMessage(String promotionMessage) The promotion message for this relation.voidsetRelatedProduct(Product relatedProduct) The underlyingProductthat is being associated to as the actual promotional product.voidWhether the persistent counterpart to thisPromotionalProducthas a non-default value forSortable.getSorting(), which determines order in admin list grids and ordering ofPromotionalProductsthat appear in customer-facing frontend views driven byPromotionalProduct.voidtoString()
-
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 underlyingProductthat 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 thisPromotionalProducthas a non-default value forSortable.getSorting(), which determines order in admin list grids and ordering ofPromotionalProductsthat appear in customer-facing frontend views driven byPromotionalProduct.- Specified by:
getSortedin interfacecom.broadleafcommerce.data.tracking.core.sort.business.domain.Sorted- Returns:
- Whether the persistent counterpart to this
PromotionalProducthas 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 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 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 underlyingProductthat 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 thisPromotionalProducthas a non-default value forSortable.getSorting(), which determines order in admin list grids and ordering ofPromotionalProductsthat appear in customer-facing frontend views driven byPromotionalProduct.- Parameters:
sorted- Whether the persistent counterpart to thisPromotionalProducthas 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 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
-