Class EnhancedProratedItemOfferAdjustment
- java.lang.Object
-
- com.broadleafcommerce.promotion.offer.web.context.info.EnhancedProratedItemOfferAdjustment
-
- All Implemented Interfaces:
com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment,Serializable
public class EnhancedProratedItemOfferAdjustment extends Object implements com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment, Serializable
DTO containing prorated price adjustment information for aEnhancedLineItemcaused by aCandidateItemOffertargeting it (seeOffer.getTargetItemCriteria()) or using it as a qualifier (seeOffer.getItemQualifierCriteria()).If an
offer's discount's proration typeisProrationType.TARGET_AND_QUALIFIER, then the discount should be spread between target items and item qualifiers. Thus, this DTO will contain the additional adjustments created for qualifiers. Practically, this information is only needed for reporting services since the total discount is the same for theEnhancedLineItemhowever it gets distributed amongst its individual merchandising items.- Author:
- Nathan Moore (nathanmoore).
- See Also:
ProrationType,Discount.getProrationType(),Offer.getDiscount(),Offer.getItemQualifierCriteria(),Offer.getTargetItemCriteria(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EnhancedProratedItemOfferAdjustment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSelfToParentDetail()protected booleancanEqual(Object other)booleanequals(Object o)javax.money.MonetaryAmountgetAmount()The amount of the adjustment applied to the item.com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRefgetLineItem()TheLineItemRefof theEnhancedLineItemthat gets this adjustment.com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRefgetOffer()TheOfferReffor theOfferthat caused this adjustment to be applied.LineItemOfferDetailgetParentDetail()intgetQuantity()The quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.inthashCode()voidsetAmount(javax.money.MonetaryAmount amount)The amount of the adjustment applied to the item.voidsetLineItem(com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef lineItem)TheLineItemRefof theEnhancedLineItemthat gets this adjustment.voidsetOffer(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer)TheOfferReffor theOfferthat caused this adjustment to be applied.voidsetParentDetail(LineItemOfferDetail parentDetail)voidsetQuantity(int quantity)The quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.StringtoString()
-
-
-
Method Detail
-
addSelfToParentDetail
public void addSelfToParentDetail()
-
getLineItem
public com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef getLineItem()
TheLineItemRefof theEnhancedLineItemthat gets this adjustment.- Specified by:
getLineItemin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Returns:
- The
LineItemRefof theEnhancedLineItemthat gets this adjustment.
-
getOffer
public com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef getOffer()
TheOfferReffor theOfferthat caused this adjustment to be applied.- Specified by:
getOfferin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Returns:
- The
OfferReffor theOfferthat caused this adjustment to be applied.
-
getAmount
public javax.money.MonetaryAmount getAmount()
The amount of the adjustment applied to the item.- Specified by:
getAmountin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Returns:
- The amount of the adjustment applied to the item.
-
getQuantity
public int getQuantity()
The quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.- Specified by:
getQuantityin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Returns:
- The quantity of merchandising items from the
EnhancedLineItemto which this adjustment applies.
-
getParentDetail
public LineItemOfferDetail getParentDetail()
-
setLineItem
public void setLineItem(com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef lineItem)
TheLineItemRefof theEnhancedLineItemthat gets this adjustment.- Specified by:
setLineItemin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Parameters:
itemLineNumber- TheLineItemRefof theEnhancedLineItemthat gets this adjustment.
-
setOffer
public void setOffer(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer)
TheOfferReffor theOfferthat caused this adjustment to be applied.- Specified by:
setOfferin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Parameters:
offer- TheOfferReffor theOfferthat caused this adjustment to be applied.
-
setAmount
public void setAmount(javax.money.MonetaryAmount amount)
The amount of the adjustment applied to the item.- Specified by:
setAmountin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Parameters:
amount- The amount of the adjustment applied to the item.
-
setQuantity
public void setQuantity(int quantity)
The quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.- Specified by:
setQuantityin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Parameters:
quantity- The quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.
-
setParentDetail
public void setParentDetail(LineItemOfferDetail parentDetail)
-
canEqual
protected boolean canEqual(Object other)
-
-