Class CandidateFulfillmentGroupOffer
- java.lang.Object
-
- com.broadleafcommerce.promotion.offer.service.dto.BaseCandidateOffer
-
- com.broadleafcommerce.promotion.offer.service.dto.CandidateFulfillmentGroupOffer
-
- All Implemented Interfaces:
Serializable
public class CandidateFulfillmentGroupOffer extends BaseCandidateOffer implements Serializable
DTO containing information necessary for determining if anOfferthat can apply to one or moreEnhancedFulfillmentGroups is part of the best permutation of all offers applicable to that group.- Author:
- Nathan Moore (nathanmoore).
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static BigDecimalONE_HUNDRED
-
Constructor Summary
Constructors Constructor Description CandidateFulfillmentGroupOffer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)protected javax.money.MonetaryAmountcomputeDiscountedAmount(CandidateFulfillmentGroup candidateFulfillmentGroup)booleanequals(Object o)protected javax.money.MonetaryAmountgetBaseTotal(CandidateFulfillmentGroup candidateFulfillmentGroup)List<CandidateFulfillmentGroup>getCandidateFulfillmentGroups()TheCandidateFulfillmentGroupsthat can be targeted byBaseCandidateOffer.offer, each one representing a decoratedEnhancedFulfillmentGroupwith savings information.protected javax.money.MonetaryAmountgetDiscountedAmount(CandidateFulfillmentGroup candidateFulfillmentGroup)LonggetPriority()The priority of theBaseCandidateOffer.offer.javax.money.MonetaryAmountgetTotalSavings()Total savings across allcandidateFulfillmentGroupsfor theBaseCandidateOffer.offer.inthashCode()voidincrementTotalSavings(javax.money.MonetaryAmount incrementAmount)voidpriceGroups()Price each of theCandidateFulfillmentGroupsaccording to theBaseCandidateOffer.offer.voidsetCandidateFulfillmentGroups(List<CandidateFulfillmentGroup> candidateFulfillmentGroups)TheCandidateFulfillmentGroupsthat can be targeted byBaseCandidateOffer.offer, each one representing a decoratedEnhancedFulfillmentGroupwith savings information.voidsetTotalSavings(javax.money.MonetaryAmount totalSavings)Total savings across allcandidateFulfillmentGroupsfor theBaseCandidateOffer.offer.voidsortGroups()Sort theCandidateFulfillmentGroupsaccording to best discount.StringtoString()-
Methods inherited from class com.broadleafcommerce.promotion.offer.service.dto.BaseCandidateOffer
getCombinableOverrides, getCurrency, getDiscountMethodType, getDiscountTargetType, getNonCombinableOverrides, getOffer, getOfferCombinabilityCriteriaKey, getOfferId, getPotentialSavings, getRoundingMode, getStackableOverrides, isRoundOfferValues, populateCombinabilityStructures, populateCombinabilityStructuresUsedBySameTargetType, setCombinableOverrides, setCurrency, setNonCombinableOverrides, setOffer, setOfferCombinabilityCriteriaKey, setPotentialSavings, setRoundingMode, setRoundOfferValues, setStackableOverrides, updateOfferCombinabilityCriteria
-
-
-
-
Field Detail
-
ONE_HUNDRED
public static final BigDecimal ONE_HUNDRED
-
-
Method Detail
-
incrementTotalSavings
public void incrementTotalSavings(javax.money.MonetaryAmount incrementAmount)
-
getPriority
public Long getPriority()
The priority of theBaseCandidateOffer.offer.- Returns:
- The priority of the
BaseCandidateOffer.offer.
-
priceGroups
public void priceGroups()
Price each of theCandidateFulfillmentGroupsaccording to theBaseCandidateOffer.offer.
-
sortGroups
public void sortGroups()
Sort theCandidateFulfillmentGroupsaccording to best discount.
-
getBaseTotal
protected javax.money.MonetaryAmount getBaseTotal(CandidateFulfillmentGroup candidateFulfillmentGroup)
-
getDiscountedAmount
protected javax.money.MonetaryAmount getDiscountedAmount(CandidateFulfillmentGroup candidateFulfillmentGroup)
-
computeDiscountedAmount
protected javax.money.MonetaryAmount computeDiscountedAmount(CandidateFulfillmentGroup candidateFulfillmentGroup)
-
getCandidateFulfillmentGroups
public List<CandidateFulfillmentGroup> getCandidateFulfillmentGroups()
TheCandidateFulfillmentGroupsthat can be targeted byBaseCandidateOffer.offer, each one representing a decoratedEnhancedFulfillmentGroupwith savings information.- Returns:
- The
EnhancedFulfillmentGroup(s) that can be targeted byBaseCandidateOffer.offer.
-
getTotalSavings
public javax.money.MonetaryAmount getTotalSavings()
Total savings across allcandidateFulfillmentGroupsfor theBaseCandidateOffer.offer.- Returns:
- Total savings across all
candidateFulfillmentGroupsfor theBaseCandidateOffer.offer.
-
setCandidateFulfillmentGroups
public void setCandidateFulfillmentGroups(List<CandidateFulfillmentGroup> candidateFulfillmentGroups)
TheCandidateFulfillmentGroupsthat can be targeted byBaseCandidateOffer.offer, each one representing a decoratedEnhancedFulfillmentGroupwith savings information.- Parameters:
candidateFulfillmentGroups- TheEnhancedFulfillmentGroup(s) that can be targeted byBaseCandidateOffer.offer.
-
setTotalSavings
public void setTotalSavings(javax.money.MonetaryAmount totalSavings)
Total savings across allcandidateFulfillmentGroupsfor theBaseCandidateOffer.offer.- Parameters:
totalSavings- Total savings across allcandidateFulfillmentGroupsfor theBaseCandidateOffer.offer.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classBaseCandidateOffer
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqualin classBaseCandidateOffer
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBaseCandidateOffer
-
toString
public String toString()
- Overrides:
toStringin classBaseCandidateOffer
-
-