Class OrderItemImpl
- All Implemented Interfaces:
Serializable,Cloneable,org.broadleafcommerce.common.admin.domain.AdminMainEntity,org.broadleafcommerce.common.copy.MultiTenantCloneable<OrderItem>,org.broadleafcommerce.common.currency.util.CurrencyCodeIdentifiable,OrderItem
- Direct Known Subclasses:
BundleOrderItemImpl,DiscreteOrderItemImpl
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.common.audit.Auditableprotected List<CandidateItemOffer>protected Categoryprotected Categoryprotected Booleanprotected GiftWrapOrderItemprotected Booleanprotected Longprotected Booleanprotected Stringprotected Orderprotected List<OrderItemAdjustment>protected Map<String,OrderItemAttribute> protected List<OrderItemPriceDetail>protected List<OrderItemQualifier>protected Stringprotected OrderItemprotected PersonalMessageprotected BigDecimalprotected List<ProratedOrderItemAdjustment>protected intprotected BigDecimalprotected Booleanprotected BigDecimalprotected Booleanprotected BigDecimalDeprecated.Fields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCandidateItemOffer(CandidateItemOffer candidateItemOffer) Used by the promotion engine to add offers that might apply to this orderItem.voidUsed to set the final price of the item and corresponding details.voidcheckCloneable(OrderItem orderItem) clone()protected OrderItemTypeconvertOrderItemType(String type) protected org.broadleafcommerce.common.money.MoneyconvertToMoney(BigDecimal amount) <G extends OrderItem>
org.broadleafcommerce.common.copy.CreateResponse<G>createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) booleanvoidCalled by the pricing engine after prices have been computed.org.broadleafcommerce.common.money.Moneyorg.broadleafcommerce.common.audit.Auditableorg.broadleafcommerce.common.money.MoneyReturns the average unit item adjustments.org.broadleafcommerce.common.money.MoneyReturns the average unit display price for the item.org.broadleafcommerce.common.money.MoneyReturns the total for future credit item level adjustments.org.broadleafcommerce.common.money.MoneygetFutureCreditTotalAdjustmentValue(boolean includeChildren) Returns the total for future credit item level adjustments.getId()The unique identifier of this OrderItembooleanReturns true if this item received a discount.booleanDefault implementation usesOrderItem.getSalePrice()<OrderItem.getRetailPrice()getName()Generally copied from the Sku.getName()getOrder()Reference back to the containing order.Returns item level adjustment for versions of Broadleaf Commerce prior to 2.3.0 which replaced this concept with OrderItemPriceDetail adjustments.A list of arbitrary attributes added to this item.Collection of priceDetails for this orderItem.If any quantity of this item was used to qualify for an offer, then this returned list will indicate the offer and the relevant quantity.org.broadleafcommerce.common.money.MoneygetPrice()org.broadleafcommerce.common.money.MoneygetPriceBeforeAdjustments(boolean allowSalesPrice) Returns the unit price of this item.org.broadleafcommerce.common.money.MoneygetPriceBeforeAdjustments(boolean allowSalesPrice, boolean includeChildren) Returns a list of all prorated adjustments for this order item.intThe quantity of thisOrderItem.org.broadleafcommerce.common.money.MoneyThe retail price of the item that was added to theOrderat the time that this was added.org.broadleafcommerce.common.money.MoneyReturns the salePrice for this item.org.broadleafcommerce.common.money.Moneyorg.broadleafcommerce.common.money.MoneyReturns the total for all item level adjustments.org.broadleafcommerce.common.money.MoneygetTotalAdjustmentValue(boolean includeChildren) Returns the total for all item level adjustments.org.broadleafcommerce.common.money.MoneyReturns the total price to be paid for this order item including item-level adjustments.org.broadleafcommerce.common.money.MoneygetTotalPrice(boolean includeChildren) Returns the total price to be paid for this order item including item-level adjustments.org.broadleafcommerce.common.money.MoneygetTotalPriceBeforeAdjustments(boolean allowSalesPrice) Returns the total price to be paid before adjustments.inthashCode()booleanisAParentOf(OrderItem candidateChild) booleanbooleanIf true, this item can be discounted..booleanisInCategory(String categoryName) booleanReturns true if the retail price was manually set.booleanReturns true if the sale price was manually set.booleanReturns a boolean indicating whether this sku is active.Returns whether or not this item is taxable.intRemoves all adjustment for this order item and reset the adjustment price.voidRemoves all candidate offers.voidsetAuditable(org.broadleafcommerce.common.audit.Auditable auditable) Sets the Auditable date object - typially set by Hibernate through the AuditableListenervoidsetCandidateItemOffers(List<CandidateItemOffer> candidateItemOffers) voidsetCartMessages(List<String> cartMessage) Sets the list of messages that should be displayed in the cartvoidsetCategory(Category category) voidsetChildOrderItems(List<OrderItem> childOrderItems) Sets the list of orderitems that are dependent on this order itemvoidsetDiscountingAllowed(boolean discountsAllowed) Turns off discount processing for this line item.voidsetGiftWrapOrderItem(GiftWrapOrderItem giftWrapOrderItem) voidsetHasValidationError(Boolean hasValidationError) Sets whether or not this order item has an error associated with itvoidSets the unique id of the OrderItem.voidSets the name of this order item.voidSets the order for this orderItem.voidsetOrderItemAdjustments(List<OrderItemAdjustment> orderItemAdjustments) voidsetOrderItemAttributes(Map<String, OrderItemAttribute> orderItemAttributes) Sets the map of order item attributes.voidsetOrderItemPriceDetails(List<OrderItemPriceDetail> orderItemPriceDetails) Returns the list of orderItem price details.voidsetOrderItemQualifiers(List<OrderItemQualifier> orderItemQualifiers) Sets the list of OrderItemQualifiersvoidsetOrderItemType(OrderItemType orderItemType) voidsetParentOrderItem(OrderItem parentOrderItem) Sets the parent order item for this order itemvoidsetPersonalMessage(PersonalMessage personalMessage) voidsetPrice(org.broadleafcommerce.common.money.Money finalPrice) Calling this method is the same as calling the following:voidsetProratedOrderItemAdjustments(List<ProratedOrderItemAdjustment> proratedOrderItemAdjustments) Sets the list of prorated order item adjustments for this order item.voidsetQuantity(int quantity) Sets the quantity of this itemvoidsetRetailPrice(org.broadleafcommerce.common.money.Money retailPrice) Calling this method will manually set the retailPrice.voidsetRetailPriceOverride(boolean override) Indicates that the retail price was manually set.voidsetSalePrice(org.broadleafcommerce.common.money.Money salePrice) Calling this method will manually set the salePrice.voidsetSalePriceOverride(boolean override) Indicates that the sale price was manually set.voidsetTaxable(Boolean taxable) Sets whether or not this item is taxable.protected booleanDeprecated.booleanUsed to reset the base price of the item that the pricing engine uses.
-
Field Details
-
id
-
auditable
protected org.broadleafcommerce.common.audit.Auditable auditable -
category
-
order
-
price
-
quantity
protected int quantity -
retailPrice
-
salePrice
-
name
-
personalMessage
-
giftWrapOrderItem
-
orderItemAdjustments
-
proratedOrderItemAdjustments
-
orderItemQualifiers
-
candidateItemOffers
-
orderItemPriceDetails
-
orderItemType
-
itemTaxable
-
retailPriceOverride
-
salePriceOverride
-
discountsAllowed
-
orderItemAttributeMap
-
totalTax
Deprecated. -
childOrderItems
-
parentOrderItem
-
hasValidationError
-
cartMessages
-
deproxiedCategory
-
-
Constructor Details
-
OrderItemImpl
public OrderItemImpl()
-
-
Method Details
-
getRetailPrice
public org.broadleafcommerce.common.money.Money getRetailPrice()Description copied from interface:OrderItemThe retail price of the item that was added to theOrderat the time that this was added. This is preferable to use as opposed to checking the price of the item that was added from the catalog domain (like inDiscreteOrderItem, usingDiscreteOrderItem.getSku()'s retail price) since the price in the catalog domain could have changed since the item was added to theOrder.- Specified by:
getRetailPricein interfaceOrderItem- Returns:
-
setRetailPrice
public void setRetailPrice(org.broadleafcommerce.common.money.Money retailPrice) Description copied from interface:OrderItemCalling this method will manually set the retailPrice. To avoid the pricing engine resetting this price, you should also make a call to {@link #setRetailPriceOverride(true)}Consider also calling
OrderItem.setDiscountingAllowed(boolean)with a value of false to restrict discounts after manually setting the retail price.- Specified by:
setRetailPricein interfaceOrderItem
-
getSalePrice
public org.broadleafcommerce.common.money.Money getSalePrice()Description copied from interface:OrderItemReturns the salePrice for this item. Note this method will return the lower of the retailPrice or salePrice. It will return the retailPrice instead of null.For SKU based pricing, a call to
OrderItem.updateSaleAndRetailPrices()will ensure that the retailPrice being used is current.- Specified by:
getSalePricein interfaceOrderItem- Returns:
-
setSalePrice
public void setSalePrice(org.broadleafcommerce.common.money.Money salePrice) Description copied from interface:OrderItemCalling this method will manually set the salePrice. It will also make a call to {@link #setSalePriceSetManually(true)}To avoid the pricing engine resetting this price, you should also make a call to {@link #setSalePriceOverride(true)}
Typically for
DiscreteOrderItems, the prices will be set with a call toOrderItem.updateSaleAndRetailPrices()which will use the Broadleaf dynamic pricing engine or the values directly tied to the SKU.- Specified by:
setSalePricein interfaceOrderItem
-
getPrice
public org.broadleafcommerce.common.money.Money getPrice() -
setPrice
public void setPrice(org.broadleafcommerce.common.money.Money finalPrice) Description copied from interface:OrderItemCalling this method is the same as calling the following:OrderItem.setRetailPrice(Money)OrderItem.setSalePrice(Money){@link #setRetailPriceOverride(true)} {@link #setSalePriceOverride(true)} {@link #setDiscountingAllowed(false)}This has the effect of setting the price in a way that no discounts or adjustments can be made.
-
getTaxablePrice
public org.broadleafcommerce.common.money.Money getTaxablePrice()- Specified by:
getTaxablePricein interfaceOrderItem- Returns:
-
getAuditable
public org.broadleafcommerce.common.audit.Auditable getAuditable()- Specified by:
getAuditablein interfaceOrderItem- Returns:
- the Auditable date for this record
-
setAuditable
public void setAuditable(org.broadleafcommerce.common.audit.Auditable auditable) Description copied from interface:OrderItemSets the Auditable date object - typially set by Hibernate through the AuditableListener- Specified by:
setAuditablein interfaceOrderItem
-
getQuantity
public int getQuantity()Description copied from interface:OrderItemThe quantity of thisOrderItem.- Specified by:
getQuantityin interfaceOrderItem- Returns:
-
setQuantity
public void setQuantity(int quantity) Description copied from interface:OrderItemSets the quantity of this item- Specified by:
setQuantityin interfaceOrderItem
-
getCategory
- Specified by:
getCategoryin interfaceOrderItem
-
setCategory
- Specified by:
setCategoryin interfaceOrderItem
-
getCandidateItemOffers
- Specified by:
getCandidateItemOffersin interfaceOrderItem
-
setCandidateItemOffers
- Specified by:
setCandidateItemOffersin interfaceOrderItem
-
getPersonalMessage
- Specified by:
getPersonalMessagein interfaceOrderItem
-
setPersonalMessage
- Specified by:
setPersonalMessagein interfaceOrderItem
-
getOrder
Description copied from interface:OrderItemReference back to the containing order. -
setOrder
Description copied from interface:OrderItemSets the order for this orderItem. -
getId
Description copied from interface:OrderItemThe unique identifier of this OrderItem -
setId
Description copied from interface:OrderItemSets the unique id of the OrderItem. Typically left null for new items and Broadleaf will set using the next sequence number. -
getName
Description copied from interface:OrderItemGenerally copied from the Sku.getName() -
setName
Description copied from interface:OrderItemSets the name of this order item. -
isInCategory
- Specified by:
isInCategoryin interfaceOrderItem
-
getOrderItemQualifiers
Description copied from interface:OrderItemIf any quantity of this item was used to qualify for an offer, then this returned list will indicate the offer and the relevant quantity.As an example, a BuyOneGetOneFree offer would have 1 qualifier and 1 adjustment.
- Specified by:
getOrderItemQualifiersin interfaceOrderItem- Returns:
- a List of OrderItemAdjustment
-
setOrderItemQualifiers
Description copied from interface:OrderItemSets the list of OrderItemQualifiers- Specified by:
setOrderItemQualifiersin interfaceOrderItem
-
getOrderItemAdjustments
Description copied from interface:OrderItemReturns item level adjustment for versions of Broadleaf Commerce prior to 2.3.0 which replaced this concept with OrderItemPriceDetail adjustments.- Specified by:
getOrderItemAdjustmentsin interfaceOrderItem- Returns:
- a List of OrderItemAdjustment
-
setOrderItemAdjustments
- Specified by:
setOrderItemAdjustmentsin interfaceOrderItem
-
getProratedOrderItemAdjustments
Description copied from interface:OrderItemReturns a list of all prorated adjustments for this order item.- Specified by:
getProratedOrderItemAdjustmentsin interfaceOrderItem- Returns:
-
setProratedOrderItemAdjustments
public void setProratedOrderItemAdjustments(List<ProratedOrderItemAdjustment> proratedOrderItemAdjustments) Description copied from interface:OrderItemSets the list of prorated order item adjustments for this order item.- Specified by:
setProratedOrderItemAdjustmentsin interfaceOrderItem
-
getAdjustmentValue
public org.broadleafcommerce.common.money.Money getAdjustmentValue()- Specified by:
getAdjustmentValuein interfaceOrderItem- Returns:
-
getGiftWrapOrderItem
- Specified by:
getGiftWrapOrderItemin interfaceOrderItem
-
setGiftWrapOrderItem
- Specified by:
setGiftWrapOrderItemin interfaceOrderItem
-
getOrderItemType
- Specified by:
getOrderItemTypein interfaceOrderItem
-
setOrderItemType
- Specified by:
setOrderItemTypein interfaceOrderItem
-
getIsOnSale
public boolean getIsOnSale()Description copied from interface:OrderItemDefault implementation usesOrderItem.getSalePrice()<OrderItem.getRetailPrice()- Specified by:
getIsOnSalein interfaceOrderItem- Returns:
-
getIsDiscounted
public boolean getIsDiscounted()Description copied from interface:OrderItemReturns true if this item received a discount.- Specified by:
getIsDiscountedin interfaceOrderItem- Returns:
-
updateSaleAndRetailPrices
public boolean updateSaleAndRetailPrices()Description copied from interface:OrderItemUsed to reset the base price of the item that the pricing engine uses.Generally, this will update the retailPrice and salePrice based on the corresponding value in the SKU.
If the retail or sale price was manually set, this method will not change those prices.
For non-manually set prices, prices can change based on system activities such as locale changes and customer authentication, this method is used to ensure that all cart items reflect the current base price before executing other pricing / adjustment operations.
Other known scenarios that can effect the base prices include the automatic bundling or loading a stale cart from the database.
See notes in subclasses for specific behavior of this method.
- Specified by:
updateSaleAndRetailPricesin interfaceOrderItem- Returns:
- true if the base prices changed as a result of this call
-
finalizePrice
public void finalizePrice()Description copied from interface:OrderItemCalled by the pricing engine after prices have been computed. Allows the system to set the averagePrice that is stored for the item.- Specified by:
finalizePricein interfaceOrderItem
-
assignFinalPrice
public void assignFinalPrice()Description copied from interface:OrderItemUsed to set the final price of the item and corresponding details.- Specified by:
assignFinalPricein interfaceOrderItem
-
getPriceBeforeAdjustments
public org.broadleafcommerce.common.money.Money getPriceBeforeAdjustments(boolean allowSalesPrice) Description copied from interface:OrderItemReturns the unit price of this item. If the parameter allowSalesPrice is true, will return the sale price if one exists.Note that retail and sale prices are initialized for an
OrderItemduring the first execution of any method that depends on the sale or retail price including this one.- Specified by:
getPriceBeforeAdjustmentsin interfaceOrderItem- Returns:
- See Also:
-
getPriceBeforeAdjustments
public org.broadleafcommerce.common.money.Money getPriceBeforeAdjustments(boolean allowSalesPrice, boolean includeChildren) - Specified by:
getPriceBeforeAdjustmentsin interfaceOrderItem
-
addCandidateItemOffer
Description copied from interface:OrderItemUsed by the promotion engine to add offers that might apply to this orderItem.- Specified by:
addCandidateItemOfferin interfaceOrderItem
-
removeAllCandidateItemOffers
public void removeAllCandidateItemOffers()Description copied from interface:OrderItemRemoves all candidate offers. Used by the promotion engine which subsequently adds the candidate offers that might apply back to this item.- Specified by:
removeAllCandidateItemOffersin interfaceOrderItem
-
removeAllAdjustments
public int removeAllAdjustments()Description copied from interface:OrderItemRemoves all adjustment for this order item and reset the adjustment price.- Specified by:
removeAllAdjustmentsin interfaceOrderItem
-
getOrderItemAttributes
A list of arbitrary attributes added to this item.- Specified by:
getOrderItemAttributesin interfaceOrderItem
-
setOrderItemAttributes
Sets the map of order item attributes.- Specified by:
setOrderItemAttributesin interfaceOrderItem- Parameters:
orderItemAttributes-
-
isTaxable
Description copied from interface:OrderItemReturns whether or not this item is taxable. If this flag is not set, it returns true by default -
setTaxable
Description copied from interface:OrderItemSets whether or not this item is taxable. Generally, this has been copied from the setting of the relevant SKU at the time it was added.- Specified by:
setTaxablein interfaceOrderItem
-
isDiscountingAllowed
public boolean isDiscountingAllowed()Description copied from interface:OrderItemIf true, this item can be discounted..- Specified by:
isDiscountingAllowedin interfaceOrderItem
-
setDiscountingAllowed
public void setDiscountingAllowed(boolean discountsAllowed) Description copied from interface:OrderItemTurns off discount processing for this line item.- Specified by:
setDiscountingAllowedin interfaceOrderItem
-
getAveragePrice
public org.broadleafcommerce.common.money.Money getAveragePrice()Description copied from interface:OrderItemReturns the average unit display price for the item.Some implementations may choose to show this on a view cart screen. Due to fractional discounts, it the display could represent a unit price that is off.
For example, if this OrderItem had 3 items at $1 each and also received a $1 discount. The net effect under the default rounding scenario would be an average price of $0.666666
Most systems would represent this as $0.67 as the discounted unit price; however, this amount times 3 ($2.01) would not equal the getTotalPrice() which would be $2.00. For this reason, it is not recommended that implementations utilize this field. Instead, they may choose not to show the unit price or show multiple prices by looping through the OrderItemPriceDetails.
- Specified by:
getAveragePricein interfaceOrderItem- Returns:
-
getAverageAdjustmentValue
public org.broadleafcommerce.common.money.Money getAverageAdjustmentValue()Description copied from interface:OrderItemReturns the average unit item adjustments.For example, if this item has a quantity of 2 at a base-price of $10 and a 10% discount applies to both then this method would return $1.
Some implementations may choose to show this on a view cart screen. Due to fractional discounts, the display could represent a unit adjustment value that is off due to rounding. See
OrderItem.getAveragePrice()for an example of this.Implementations wishing to show unit prices may choose instead to show the individual OrderItemPriceDetails instead of this value to avoid the rounding problem. This would result in multiple cart item display rows for each OrderItem.
Alternatively, the cart display should use
OrderItem.getTotalAdjustmentValue().- Specified by:
getAverageAdjustmentValuein interfaceOrderItem- Returns:
-
getTotalAdjustmentValue
public org.broadleafcommerce.common.money.Money getTotalAdjustmentValue()Description copied from interface:OrderItemReturns the total for all item level adjustments.For example, if the item has a 2 items priced at $10 a piece and a 10% discount applies to both quantities. This method would return $2.
- Specified by:
getTotalAdjustmentValuein interfaceOrderItem- Returns:
-
getTotalAdjustmentValue
public org.broadleafcommerce.common.money.Money getTotalAdjustmentValue(boolean includeChildren) Description copied from interface:OrderItemReturns the total for all item level adjustments.- Specified by:
getTotalAdjustmentValuein interfaceOrderItem- Returns:
-
getFutureCreditTotalAdjustmentValue
public org.broadleafcommerce.common.money.Money getFutureCreditTotalAdjustmentValue()Description copied from interface:OrderItemReturns the total for future credit item level adjustments.For example, if the item has a 2 items priced at $10 a piece and a 10% discount applies to both quantities. This method would return $2.
See
Offer.getAdjustmentType()for more info on future credit- Specified by:
getFutureCreditTotalAdjustmentValuein interfaceOrderItem- Returns:
-
getFutureCreditTotalAdjustmentValue
public org.broadleafcommerce.common.money.Money getFutureCreditTotalAdjustmentValue(boolean includeChildren) Description copied from interface:OrderItemReturns the total for future credit item level adjustments.See
Offer.getAdjustmentType()for more info on future credit- Specified by:
getFutureCreditTotalAdjustmentValuein interfaceOrderItem- Returns:
-
getTotalPrice
public org.broadleafcommerce.common.money.Money getTotalPrice()Description copied from interface:OrderItemReturns the total price to be paid for this order item including item-level adjustments.It does not include the effect of order level adjustments. Calculated by looping through the orderItemPriceDetails
- Specified by:
getTotalPricein interfaceOrderItem- Returns:
-
getTotalPrice
public org.broadleafcommerce.common.money.Money getTotalPrice(boolean includeChildren) Description copied from interface:OrderItemReturns the total price to be paid for this order item including item-level adjustments.- Specified by:
getTotalPricein interfaceOrderItem- Returns:
-
getTotalPriceBeforeAdjustments
public org.broadleafcommerce.common.money.Money getTotalPriceBeforeAdjustments(boolean allowSalesPrice) Description copied from interface:OrderItemReturns the total price to be paid before adjustments.- Specified by:
getTotalPriceBeforeAdjustmentsin interfaceOrderItem- Returns:
-
isRetailPriceOverride
public boolean isRetailPriceOverride()Description copied from interface:OrderItemReturns true if the retail price was manually set. If the retail price is manually set, calls to updatePrices() will not do anything.- Specified by:
isRetailPriceOverridein interfaceOrderItem- Returns:
-
setRetailPriceOverride
public void setRetailPriceOverride(boolean override) Description copied from interface:OrderItemIndicates that the retail price was manually set. A typical usage might be for a CSR who has override privileges to control setting the price. This will automatically be set by callingOrderItem.setRetailPrice(Money)- Specified by:
setRetailPriceOverridein interfaceOrderItem
-
isSalePriceOverride
public boolean isSalePriceOverride()Description copied from interface:OrderItemReturns true if the sale price was manually set. If the retail price is manually set, calls to updatePrices() will not do anything.- Specified by:
isSalePriceOverridein interfaceOrderItem- Returns:
-
setSalePriceOverride
public void setSalePriceOverride(boolean override) Description copied from interface:OrderItemIndicates that the sale price was manually set. A typical usage might be for a CSR who has override privileges to control setting the price.Consider also calling
OrderItem.setDiscountingAllowed(boolean)with a value of false to restrict discounts after manually setting the retail price.If the salePrice is not lower than the retailPrice, the system will return the retailPrice when a call to
OrderItem.getSalePrice()is made.- Specified by:
setSalePriceOverridein interfaceOrderItem
-
getOrderItemPriceDetails
Description copied from interface:OrderItemCollection of priceDetails for this orderItem.Without discounts, an orderItem would have exactly 1 ItemPriceDetail. When orderItem discounting or tax-calculations result in an orderItem having multiple prices like in a buy-one-get-one free example, the orderItem will get an additional ItemPriceDetail.
Generally, an OrderItem will have 1 ItemPriceDetail record for each uniquely priced version of the item.
- Specified by:
getOrderItemPriceDetailsin interfaceOrderItem
-
setOrderItemPriceDetails
Description copied from interface:OrderItemReturns the list of orderItem price details.- Specified by:
setOrderItemPriceDetailsin interfaceOrderItem
-
getChildOrderItems
- Specified by:
getChildOrderItemsin interfaceOrderItem- Returns:
- the list of orderitems that are dependent on this order item
-
setChildOrderItems
Description copied from interface:OrderItemSets the list of orderitems that are dependent on this order item- Specified by:
setChildOrderItemsin interfaceOrderItem
-
getParentOrderItem
- Specified by:
getParentOrderItemin interfaceOrderItem- Returns:
- the parent order item for this item (potentially null)
-
setParentOrderItem
Description copied from interface:OrderItemSets the parent order item for this order item- Specified by:
setParentOrderItemin interfaceOrderItem
-
getHasValidationError
- Specified by:
getHasValidationErrorin interfaceOrderItem- Returns:
- whether or not this order item has an error
-
setHasValidationError
Description copied from interface:OrderItemSets whether or not this order item has an error associated with it- Specified by:
setHasValidationErrorin interfaceOrderItem
-
getCartMessages
- Specified by:
getCartMessagesin interfaceOrderItem- Returns:
- the list of messages that should be displayed in the cart
-
setCartMessages
Description copied from interface:OrderItemSets the list of messages that should be displayed in the cart- Specified by:
setCartMessagesin interfaceOrderItem
-
isAParentOf
- Specified by:
isAParentOfin interfaceOrderItem- Returns:
- true if the candidateChild is a child of the hierarchy starting from this OrderItem
-
isChildOrderItem
public boolean isChildOrderItem()- Specified by:
isChildOrderItemin interfaceOrderItem- Returns:
- true if the OrderItem has a parent
-
getMainEntityName
- Specified by:
getMainEntityNamein interfaceorg.broadleafcommerce.common.admin.domain.AdminMainEntity
-
getCurrencyCode
- Specified by:
getCurrencyCodein interfaceorg.broadleafcommerce.common.currency.util.CurrencyCodeIdentifiable
-
shouldSumChildren
Deprecated. -
checkCloneable
public void checkCloneable(OrderItem orderItem) throws CloneNotSupportedException, SecurityException, NoSuchMethodException -
convertToMoney
-
convertOrderItemType
-
clone
-
hashCode
public int hashCode() -
equals
-
createOrRetrieveCopyInstance
public <G extends OrderItem> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceorg.broadleafcommerce.common.copy.MultiTenantCloneable<OrderItem>- Throws:
CloneNotSupportedException
-
isSkuActive
public boolean isSkuActive()Description copied from interface:OrderItemReturns a boolean indicating whether this sku is active. This is used to determine whether a user the sku can add the sku to their cart.- Specified by:
isSkuActivein interfaceOrderItem
-
FulfillmentGroupItem.getTaxes()orFulfillmentGroupItem.getTotalTax()instead