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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected boolean
boolean
javax.money.MonetaryAmount
The 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.LineItemRef
TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef
getOffer()
TheOfferRef
for theOffer
that caused this adjustment to be applied.int
The quantity of merchandising items from theEnhancedLineItem
to which this adjustment applies.int
hashCode()
void
setAmount
(javax.money.MonetaryAmount amount) The amount of the adjustment applied to the item.void
setCodeUsed
(String codeUsed) The code used (if any) that triggered the application of the offer for this adjustment.void
setLineItem
(com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef lineItem) TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.void
setOffer
(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer) TheOfferRef
for theOffer
that caused this adjustment to be applied.void
setParentDetail
(LineItemOfferDetail parentDetail) void
setQuantity
(int quantity) The quantity of merchandising items from theEnhancedLineItem
to 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()TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.- Specified by:
getLineItem
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
- Returns:
- The
LineItemRef
of theEnhancedLineItem
that gets this adjustment.
-
getOffer
public com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef getOffer()TheOfferRef
for theOffer
that caused this adjustment to be applied.- Specified by:
getOffer
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
- Returns:
- The
OfferRef
for theOffer
that caused this adjustment to be applied.
-
getAmount
public javax.money.MonetaryAmount getAmount()The amount of the adjustment applied to the item.- Specified by:
getAmount
in 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 theEnhancedLineItem
to which this adjustment applies.- Specified by:
getQuantity
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
- Returns:
- The quantity of merchandising items from the
EnhancedLineItem
to which this adjustment applies.
-
getCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Specified by:
getCodeUsed
in 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) TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.- Specified by:
setLineItem
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
- Parameters:
itemLineNumber
- TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.
-
setOffer
public void setOffer(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer) TheOfferRef
for theOffer
that caused this adjustment to be applied.- Specified by:
setOffer
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
- Parameters:
offer
- TheOfferRef
for theOffer
that 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:
setAmount
in 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 theEnhancedLineItem
to which this adjustment applies.- Specified by:
setQuantity
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
- Parameters:
quantity
- The quantity of merchandising items from theEnhancedLineItem
to which this adjustment applies.
-
setCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Specified by:
setCodeUsed
in 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
-