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 a
EnhancedLineItem caused by a
CandidateItemOffer targeting it (see Offer.getTargetItemCriteria()) or using it
as a qualifier (see Offer.getItemQualifierCriteria()).
If an offer's discount's proration type is
ProrationType.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 the EnhancedLineItem however it gets distributed amongst
its individual merchandising items.
- Author:
- Nathan Moore (nathanmoore).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected booleanbooleanjavax.money.MonetaryAmountThe amount of the adjustment applied to the item.The code used (if any) that triggered the application of the offer for this adjustment.com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRefTheLineItemRefof theEnhancedLineItemthat gets this adjustment.com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRefgetOffer()TheOfferReffor theOfferthat caused this adjustment to be applied.intThe 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.voidsetCodeUsed(String codeUsed) The code used (if any) that triggered the application of the offer for this adjustment.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.toString()
-
Constructor Details
-
EnhancedProratedItemOfferAdjustment
public EnhancedProratedItemOfferAdjustment()
-
-
Method Details
-
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.
-
getCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Specified by:
getCodeUsedin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Returns:
- The code used (if any) that triggered the application of the offer for this adjustment.
-
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.
-
setCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Specified by:
setCodeUsedin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment- Parameters:
codeUsed- The code used (if any) that triggered the application of the offer for this adjustment.
-
setParentDetail
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-