Class CandidateFulfillmentGroup
- java.lang.Object
-
- com.broadleafcommerce.promotion.offer.service.dto.CandidateFulfillmentGroup
-
- All Implemented Interfaces:
Serializable
public class CandidateFulfillmentGroup extends Object implements Serializable
Represents a candidate fulfillment group for which anOfferhas been applied. Used as a list of items inCandidateFulfillmentGroupOfferto represent applying the corresponding offer to all of anorder's fulfillment groups.- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CandidateFulfillmentGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.money.MonetaryAmountcalculatePriceWithoutAdjustments()Calculate and return the price for thisEnhancedFulfillmentGroupwithout any adjustments added.protected booleancanEqual(Object other)booleanequals(Object o)Map<ItemCriteriaRule,Collection<EnhancedFulfillmentLineItem>>getCandidateQualifiersMap()Map ofItemCriteriaRulefrom anoffer's item qualifier criteriato aCollectionofEnhancedFulfillmentLineItemthat meet that criteria for thisfulfillmentGroup.javax.money.MonetaryAmountgetDiscountedAmount()The amount off this fulfillment group would get if thecandidate offerwas applied.javax.money.MonetaryAmountgetDiscountedTotal()The adjusted discounted price for this candidate fulfillment group if thecandidate offerwas applied.EnhancedFulfillmentGroupgetFulfillmentGroup()TheEnhancedFulfillmentGroupthat is decorated for consideration as part of aCandidateFulfillmentGroupOffer.inthashCode()voidresetState()Between permutation runs, we need to reset the state of intermediate valuesvoidsetCandidateQualifiersMap(Map<ItemCriteriaRule,Collection<EnhancedFulfillmentLineItem>> candidateQualifiersMap)Map ofItemCriteriaRulefrom anoffer's item qualifier criteriato aCollectionofEnhancedFulfillmentLineItemthat meet that criteria for thisfulfillmentGroup.voidsetDiscountedAmount(javax.money.MonetaryAmount discountedAmount)The amount off this fulfillment group would get if thecandidate offerwas applied.voidsetDiscountedTotal(javax.money.MonetaryAmount discountedTotal)The adjusted discounted price for this candidate fulfillment group if thecandidate offerwas applied.voidsetFulfillmentGroup(EnhancedFulfillmentGroup fulfillmentGroup)TheEnhancedFulfillmentGroupthat is decorated for consideration as part of aCandidateFulfillmentGroupOffer.StringtoString()
-
-
-
Method Detail
-
calculatePriceWithoutAdjustments
public javax.money.MonetaryAmount calculatePriceWithoutAdjustments()
Calculate and return the price for thisEnhancedFulfillmentGroupwithout any adjustments added.- Returns:
- Calculate and return the price for this
EnhancedFulfillmentGroupwithout any adjustments added.
-
resetState
public void resetState()
Between permutation runs, we need to reset the state of intermediate values
-
getFulfillmentGroup
public EnhancedFulfillmentGroup getFulfillmentGroup()
TheEnhancedFulfillmentGroupthat is decorated for consideration as part of aCandidateFulfillmentGroupOffer.
-
getCandidateQualifiersMap
public Map<ItemCriteriaRule,Collection<EnhancedFulfillmentLineItem>> getCandidateQualifiersMap()
Map ofItemCriteriaRulefrom anoffer's item qualifier criteriato aCollectionofEnhancedFulfillmentLineItemthat meet that criteria for thisfulfillmentGroup.- Returns:
- Map of
ItemCriteriaRulefrom anoffer's item qualifier criteriato aCollectionofEnhancedFulfillmentLineItemthat meet that criteria for thisfulfillmentGroup.
-
getDiscountedAmount
public javax.money.MonetaryAmount getDiscountedAmount()
The amount off this fulfillment group would get if thecandidate offerwas applied.- Returns:
- The amount off this fulfillment group would get if the
candidate offerwas applied.
-
getDiscountedTotal
public javax.money.MonetaryAmount getDiscountedTotal()
The adjusted discounted price for this candidate fulfillment group if thecandidate offerwas applied.- Returns:
- The adjusted discounted price for this candidate fulfillment group if the
candidate offerwas applied.
-
setFulfillmentGroup
public void setFulfillmentGroup(EnhancedFulfillmentGroup fulfillmentGroup)
TheEnhancedFulfillmentGroupthat is decorated for consideration as part of aCandidateFulfillmentGroupOffer.
-
setCandidateQualifiersMap
public void setCandidateQualifiersMap(Map<ItemCriteriaRule,Collection<EnhancedFulfillmentLineItem>> candidateQualifiersMap)
Map ofItemCriteriaRulefrom anoffer's item qualifier criteriato aCollectionofEnhancedFulfillmentLineItemthat meet that criteria for thisfulfillmentGroup.- Parameters:
candidateQualifiersMap- Map ofItemCriteriaRulefrom anoffer's item qualifier criteriato aCollectionofEnhancedFulfillmentLineItemthat meet that criteria for thisfulfillmentGroup.
-
setDiscountedAmount
public void setDiscountedAmount(javax.money.MonetaryAmount discountedAmount)
The amount off this fulfillment group would get if thecandidate offerwas applied.- Parameters:
discountedAmount- The amount off this fulfillment group would get if thecandidate offerwas applied.
-
setDiscountedTotal
public void setDiscountedTotal(javax.money.MonetaryAmount discountedTotal)
The adjusted discounted price for this candidate fulfillment group if thecandidate offerwas applied.- Parameters:
discountedTotal- The adjusted discounted price for this candidate fulfillment group if thecandidate offerwas applied.
-
canEqual
protected boolean canEqual(Object other)
-
-