Class EnhancedOrderLineItem
- java.lang.Object
-
- com.broadleafcommerce.promotion.offer.web.context.EnhancedLineItem
-
- com.broadleafcommerce.promotion.offer.web.context.EnhancedOrderLineItem
-
- All Implemented Interfaces:
com.broadleafcommerce.promotion.offer.client.web.context.LineItem,com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItem,Serializable
public class EnhancedOrderLineItem extends EnhancedLineItem implements com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItem
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EnhancedOrderLineItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)Set<EnhancedOrderLineItem>getChildren()Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.EnhancedOrderLineItemgetParent()Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.StringgetParentLineNumber()javax.money.MonetaryAmountgetTotalPrice(boolean includeChildren)Gets the total combined price of this order item, including any adjustments.inthashCode()booleanisAParentOf(EnhancedOrderLineItem potentialChild)Determines whether this item is a direct parent or general ancestor of the given item.voidsetChildren(Set<EnhancedOrderLineItem> children)Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.voidsetParent(EnhancedOrderLineItem parent)Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.voidsetParentLineNumber(String parentLineNumber)StringtoString()-
Methods inherited from class com.broadleafcommerce.promotion.offer.web.context.EnhancedLineItem
calculateTotalAdjustmentValue, calculateTotalWithAdjustments, createNewDetail, finalizePrice, getAdjustedTotalWithoutFutureCredits, getAttributes, getAveragePrice, getCurrency, getFinalPrice, getFinalTotalAdjustmentValue, getFutureCreditAdjustmentValue, getFutureCredits, getId, getLineNumber, getOfferDetails, getPrice, getProratedAdjustments, getQuantity, getSalePrice, getStandardPrice, getTotalPrice, getTotalPriceWithoutAdjustments, getTotalStandardPrice, getUnadjustedSalePrice, hasAdjustments, initializePriceDetails, isDependent, isDiscountable, isOnSale, isSubscription, mergeDetails, mergeLikeDetails, resetOfferDetails, resetPriceDetails, setAttributes, setCurrency, setDiscountable, setFinalPrice, setId, setLineNumber, setOfferDetails, setProratedAdjustments, setQuantity, setSalePrice, setStandardPrice, setSubscription
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.promotion.offer.client.web.context.LineItem
getAttributes, getLineNumber, getQuantity, getSalePrice, getStandardPrice, isDiscountable, isSubscription, setAttributes, setDiscountable, setLineNumber, setQuantity, setSalePrice, setStandardPrice, setSubscription
-
-
-
-
Method Detail
-
isAParentOf
public boolean isAParentOf(EnhancedOrderLineItem potentialChild)
Determines whether this item is a direct parent or general ancestor of the given item. This will repeatedly call each child'sisAParentOf(EnhancedOrderLineItem)if needed.- Parameters:
potentialChild- the item to determine whether this is a parent or ancestor- Returns:
- whether this item is a direct parent or general ancestor of the given item
-
getTotalPrice
public javax.money.MonetaryAmount getTotalPrice(boolean includeChildren)
Gets the total combined price of this order item, including any adjustments.- Parameters:
includeChildren- whether to include dependent items in the total- Returns:
- the total combined price of this order item, including any adjustments.
-
getParentLineNumber
public String getParentLineNumber()
- Specified by:
getParentLineNumberin interfacecom.broadleafcommerce.promotion.offer.client.web.context.OrderLineItem
-
getParent
public EnhancedOrderLineItem getParent()
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.- Returns:
- The parent order line item object if this is a dependent item
-
getChildren
public Set<EnhancedOrderLineItem> getChildren()
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.- Returns:
- The dependent order line item objects if any
-
setParentLineNumber
public void setParentLineNumber(String parentLineNumber)
- Specified by:
setParentLineNumberin interfacecom.broadleafcommerce.promotion.offer.client.web.context.OrderLineItem
-
setParent
public void setParent(EnhancedOrderLineItem parent)
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.- Parameters:
parent- The parent order line item object if this is a dependent item
-
setChildren
public void setChildren(Set<EnhancedOrderLineItem> children)
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing.- Parameters:
children- The dependent order line item objects if any
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classEnhancedLineItem
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqualin classEnhancedLineItem
-
hashCode
public int hashCode()
- Overrides:
hashCodein classEnhancedLineItem
-
toString
public String toString()
- Overrides:
toStringin classEnhancedLineItem
-
-