@Entity public class OrderImpl extends java.lang.Object implements Order, AdminMainEntity, CurrencyCodeIdentifiable
| Modifier and Type | Class and Description |
|---|---|
static class |
OrderImpl.Presentation |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<OfferCode> |
addedOfferCodes |
protected java.util.Map<Offer,OfferInfo> |
additionalOfferInformation |
protected Auditable |
auditable |
protected java.util.List<CandidateOrderOffer> |
candidateOrderOffers |
protected BroadleafCurrency |
currency |
protected Customer |
customer |
protected java.lang.String |
emailAddress |
protected java.util.List<FulfillmentGroup> |
fulfillmentGroups |
protected java.lang.Long |
id |
protected Locale |
locale |
protected java.lang.String |
name |
protected java.util.List<OrderAdjustment> |
orderAdjustments |
protected java.util.Map<java.lang.String,OrderAttribute> |
orderAttributes |
protected java.util.List<OrderItem> |
orderItems |
protected java.util.List<PaymentInfo> |
paymentInfos |
protected java.lang.String |
status |
protected java.util.Date |
submitDate |
protected java.math.BigDecimal |
subTotal |
protected java.math.BigDecimal |
total |
protected java.math.BigDecimal |
totalFulfillmentCharges |
protected java.math.BigDecimal |
totalTax |
MAIN_ENTITY_NAME_PROPERTY| Constructor and Description |
|---|
OrderImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAddedOfferCode(OfferCode offerCode)
Deprecated.
|
void |
addOfferCode(OfferCode offerCode) |
void |
addOrderItem(OrderItem orderItem)
|
void |
assignOrderItemsFinalPrice()
Assigns a final price to all the order items
|
Money |
calculateSubTotal()
Returns the sum of the item totals.
|
boolean |
containsSku(Sku sku)
Checks the DiscreteOrderItems in the cart and returns whether or not the given SKU was found.
|
boolean |
equals(java.lang.Object obj) |
boolean |
finalizeItemPrices()
Updates the averagePriceField for all order items.
|
java.util.List<OfferCode> |
getAddedOfferCodes() |
java.util.Map<Offer,OfferInfo> |
getAdditionalOfferInformation() |
Auditable |
getAuditable()
Gets the auditable associated with this Order instance which tracks changes made to this Order (creation/update)
|
java.util.List<CandidateOrderOffer> |
getCandidateOrderOffers()
|
Money |
getCapturedTotal()
Convenience method for determining how much of the order total has been captured.
|
BroadleafCurrency |
getCurrency()
The currency that the
Order is priced in. |
java.lang.String |
getCurrencyCode() |
Customer |
getCustomer()
|
java.util.List<DiscreteOrderItem> |
getDiscreteOrderItems()
|
java.lang.String |
getEmailAddress() |
Money |
getFulfillmentGroupAdjustmentsValue() |
java.util.List<FulfillmentGroup> |
getFulfillmentGroups()
Gets the
FulfillmentGroups associated with this Order. |
java.lang.String |
getFulfillmentStatus() |
boolean |
getHasOrderAdjustments()
Returns true if this item has order adjustments.
|
java.lang.Long |
getId() |
Money |
getItemAdjustmentsValue()
Returns the discount value of all the applied item offers for this order.
|
int |
getItemCount()
This method returns the total number of items in this order.
|
Locale |
getLocale() |
java.lang.String |
getMainEntityName() |
java.lang.String |
getName()
Gets the name of the order, mainly in order to support wishlists.
|
java.util.List<OrderAdjustment> |
getOrderAdjustments()
Returns a unmodifiable List of OrderAdjustment.
|
Money |
getOrderAdjustmentsValue()
Returns the discount value of all the applied order offers.
|
java.util.Map<java.lang.String,OrderAttribute> |
getOrderAttributes()
A list of arbitrary attributes added to this order.
|
java.util.List<OrderItem> |
getOrderItems()
|
java.lang.String |
getOrderNumber()
The unique number associated with this
Order. |
java.util.List<PaymentInfo> |
getPaymentInfos()
Gets all the
PaymentInfos associated with this Order. |
Money |
getRemainingTotal()
Convenience method for determining how much is left on the Order based on the payments that have already been
applied.
|
OrderStatus |
getStatus()
Gets the status of the Order.
|
java.util.Date |
getSubmitDate()
Gets the date that this
Order was submitted. |
Money |
getSubTotal()
Returns the subtotal price for the order.
|
Money |
getTotal()
The grand total of this
Order which includes all shipping costs and taxes, as well as any adjustments from
promotions. |
Money |
getTotalAdjustmentsValue()
Returns the total discount value for all applied item and order offers in the order.
|
Money |
getTotalFulfillmentCharges()
Gets the total fulfillment costs that should be charged for this
Order. |
Money |
getTotalShipping() |
Money |
getTotalTax()
Gets the total tax for this order, which is the sum of the taxes on all fulfillment
groups.
|
boolean |
hasCategoryItem(java.lang.String categoryName)
Determines if this
Order has an item in the given category. |
int |
hashCode() |
void |
setAdditionalOfferInformation(java.util.Map<Offer,OfferInfo> additionalOfferInformation) |
void |
setAuditable(Auditable auditable) |
void |
setCandidateOrderOffers(java.util.List<CandidateOrderOffer> candidateOrderOffers)
|
void |
setCurrency(BroadleafCurrency currency)
Set the currency that the
Order is priced in. |
void |
setCustomer(Customer customer)
Sets the associated
Customer for this Order. |
void |
setEmailAddress(java.lang.String emailAddress) |
void |
setFulfillmentGroups(java.util.List<FulfillmentGroup> fulfillmentGroups) |
void |
setId(java.lang.Long id) |
void |
setLocale(Locale locale) |
void |
setName(java.lang.String name)
Sets the name of the order in the context of a wishlist.
|
protected void |
setOrderAdjustments(java.util.List<OrderAdjustment> orderAdjustments) |
void |
setOrderAttributes(java.util.Map<java.lang.String,OrderAttribute> orderAttributes)
Sets the map of order attributes.
|
void |
setOrderItems(java.util.List<OrderItem> orderItems) |
void |
setOrderNumber(java.lang.String orderNumber)
Set the unique order number for this
Order |
void |
setPaymentInfos(java.util.List<PaymentInfo> paymentInfos)
Sets the various payment types associated with this
Order |
void |
setStatus(OrderStatus status)
Sets the status of the Order
|
void |
setSubmitDate(java.util.Date submitDate)
Set the date that this
Order was submitted. |
void |
setSubTotal(Money subTotal)
Sets the subtotal price for the order.
|
void |
setTotal(Money orderTotal)
Used in
TotalActivity to set the grand total of this Order. |
void |
setTotalFulfillmentCharges(Money totalFulfillmentCharges)
Set the total fulfillment cost of this
Order. |
void |
setTotalShipping(Money totalShipping) |
void |
setTotalTax(Money totalTax)
Sets the total tax of this order, which is the sum of the taxes on all fulfillment
groups.
|
boolean |
updatePrices()
|
protected java.lang.Long id
protected Auditable auditable
protected java.lang.String name
protected Customer customer
protected java.lang.String status
protected java.math.BigDecimal totalTax
protected java.math.BigDecimal totalFulfillmentCharges
protected java.math.BigDecimal subTotal
protected java.math.BigDecimal total
protected java.util.Date submitDate
protected java.lang.String emailAddress
protected java.util.List<OrderItem> orderItems
protected java.util.List<FulfillmentGroup> fulfillmentGroups
protected java.util.List<OrderAdjustment> orderAdjustments
protected java.util.List<OfferCode> addedOfferCodes
protected java.util.List<CandidateOrderOffer> candidateOrderOffers
protected java.util.List<PaymentInfo> paymentInfos
protected java.util.Map<java.lang.String,OrderAttribute> orderAttributes
protected BroadleafCurrency currency
protected Locale locale
public Auditable getAuditable()
OrdergetAuditable in interface Orderpublic void setAuditable(Auditable auditable)
setAuditable in interface Orderpublic Money getSubTotal()
OrdergetSubTotal in interface Orderpublic void setSubTotal(Money subTotal)
OrdersetSubTotal in interface Orderpublic Money calculateSubTotal()
OrdercalculateSubTotal in interface Orderpublic void assignOrderItemsFinalPrice()
OrderassignOrderItemsFinalPrice in interface Orderpublic Money getTotal()
OrderOrder which includes all shipping costs and taxes, as well as any adjustments from
promotions.public void setTotal(Money orderTotal)
OrderTotalActivity to set the grand total of this Order. This includes the prices of all of the
OrderItems as well as any taxes, fees, shipping and adjustments for all 3.public Money getRemainingTotal()
OrderOrder.getTotal() and subtracts the sum of all the PaymentInfos associated with this
Order. Note that if an order has been fully paid for, this method will return zero.getRemainingTotal in interface OrderOrder.getTotal() minus the PaymentInfo.getAmount() for each PaymentInfo on this Orderpublic Money getCapturedTotal()
OrderPaymentInfos
and checks the PaymentInfoDetailType for captured records.getCapturedTotal in interface Orderpublic java.util.Date getSubmitDate()
OrderOrder was submitted. Note that if this date is non-null, then the following should
also be true:
Order.getStatus() should return OrderStatus.SUBMITTEDOrder.getOrderNumber() should return a non-null valuegetSubmitDate in interface Orderpublic void setSubmitDate(java.util.Date submitDate)
OrderOrder was submitted. Used in the blCheckoutWorkflow as the last step after everything
else has been completed (payments charged, integration systems notified, etc).setSubmitDate in interface OrdersubmitDate - the date that this Order was submitted.public Customer getCustomer()
OrdergetCustomer in interface Orderpublic void setCustomer(Customer customer)
OrderCustomer for this Order.setCustomer in interface Orderpublic OrderStatus getStatus()
Orderpublic void setStatus(OrderStatus status)
Orderpublic java.util.List<OrderItem> getOrderItems()
OrdergetOrderItems in interface Orderpublic void setOrderItems(java.util.List<OrderItem> orderItems)
setOrderItems in interface Orderpublic void addOrderItem(OrderItem orderItem)
OrderaddOrderItem in interface OrderorderItem - the OrderItem to add to this Orderpublic java.util.List<FulfillmentGroup> getFulfillmentGroups()
OrderFulfillmentGroups associated with this Order. An Order can have many
FulfillmentGroups associated with it in order to support multi-address (and multi-type) shipping.getFulfillmentGroups in interface OrderFulfillmentGroups associated with this Orderpublic void setFulfillmentGroups(java.util.List<FulfillmentGroup> fulfillmentGroups)
setFulfillmentGroups in interface Orderpublic void setCandidateOrderOffers(java.util.List<CandidateOrderOffer> candidateOrderOffers)
OrdersetCandidateOrderOffers in interface Orderpublic java.util.List<CandidateOrderOffer> getCandidateOrderOffers()
OrdergetCandidateOrderOffers in interface Orderpublic java.lang.String getName()
Orderpublic void setName(java.lang.String name)
OrderCustomer can have multiple
wishlists like "Christmas" or "Gaming Computer" etc.public Money getTotalTax()
OrdergetTotalTax in interface Orderpublic void setTotalTax(Money totalTax)
OrdersetTotalTax in interface Orderpublic Money getTotalShipping()
getTotalShipping in interface Orderpublic void setTotalShipping(Money totalShipping)
setTotalShipping in interface Orderpublic Money getTotalFulfillmentCharges()
OrderOrder. This value should be equivalent to
the summation of FulfillmentGroup.getTotal() for each FulfillmentGroup associated with this
OrdergetTotalFulfillmentCharges in interface OrderOrderpublic void setTotalFulfillmentCharges(Money totalFulfillmentCharges)
OrderOrder. Used in the FulfillmentGroupPricingActivity after the cost
of each FulfillmentGroup has been calculated.setTotalFulfillmentCharges in interface Orderpublic java.util.List<PaymentInfo> getPaymentInfos()
OrderPaymentInfos associated with this Order. An Order can have many
PaymentInfos associated with it to support things like paying with multiple cards or perhaps paying some of
this Order with a gift card and some with a credit card.getPaymentInfos in interface OrderPaymentInfos associated with this Order.public void setPaymentInfos(java.util.List<PaymentInfo> paymentInfos)
OrderOrdersetPaymentInfos in interface Orderpublic boolean hasCategoryItem(java.lang.String categoryName)
OrderOrder has an item in the given category.hasCategoryItem in interface OrdercategoryName - the Category.getName() to checkOrderItem is in the given category, false otherwise.OrderItem#isInCategory(String)}public java.util.List<OrderAdjustment> getOrderAdjustments()
OrdergetOrderAdjustments in interface Orderprotected void setOrderAdjustments(java.util.List<OrderAdjustment> orderAdjustments)
public java.util.List<DiscreteOrderItem> getDiscreteOrderItems()
OrderOrderItems in this Order that are an instanceof DiscreteOrderItem. This
will also go into each BundleOrderItem (if there are any) and return all of the
BundleOrderItem.getDiscreteOrderItems() from each of those as well.getDiscreteOrderItems in interface Orderpublic boolean containsSku(Sku sku)
OrderDiscreteOrderItems from {link BundleOrderItem.getDiscreteOrderItems()containsSku in interface Ordersku - The sku to check forpublic java.util.List<OfferCode> getAddedOfferCodes()
getAddedOfferCodes in interface Orderpublic java.lang.String getOrderNumber()
OrderOrder. Generally preferred to use instead of just using Order.getId()
since that exposes unwanted information about your database.getOrderNumber in interface OrderOrderpublic void setOrderNumber(java.lang.String orderNumber)
OrderOrdersetOrderNumber in interface Orderpublic java.lang.String getFulfillmentStatus()
getFulfillmentStatus in interface Orderpublic java.lang.String getEmailAddress()
getEmailAddress in interface Orderpublic void setEmailAddress(java.lang.String emailAddress)
setEmailAddress in interface Orderpublic java.util.Map<Offer,OfferInfo> getAdditionalOfferInformation()
getAdditionalOfferInformation in interface Orderpublic void setAdditionalOfferInformation(java.util.Map<Offer,OfferInfo> additionalOfferInformation)
setAdditionalOfferInformation in interface Orderpublic Money getItemAdjustmentsValue()
OrdergetItemAdjustmentsValue in interface Orderpublic Money getFulfillmentGroupAdjustmentsValue()
getFulfillmentGroupAdjustmentsValue in interface Orderpublic Money getOrderAdjustmentsValue()
OrdergetOrderAdjustmentsValue in interface Orderpublic Money getTotalAdjustmentsValue()
OrdergetTotalAdjustmentsValue in interface Orderpublic boolean updatePrices()
OrderupdatePrices in interface OrderOrderItem returned true from OrderItem#updatePrices, false
otherwise.OrderItem#updatePrices()}public boolean finalizeItemPrices()
OrderfinalizeItemPrices in interface Orderpublic java.util.Map<java.lang.String,OrderAttribute> getOrderAttributes()
OrdergetOrderAttributes in interface Orderpublic void setOrderAttributes(java.util.Map<java.lang.String,OrderAttribute> orderAttributes)
OrdersetOrderAttributes in interface Order@Deprecated public void addAddedOfferCode(OfferCode offerCode)
addAddedOfferCode in interface Orderpublic void addOfferCode(OfferCode offerCode)
addOfferCode in interface Orderpublic BroadleafCurrency getCurrency()
OrderOrder is priced in. Note that this is only on Order since all of the other
entities that are related (like FulfillmentGroup and OrderItem have a link back to here. This also
has the side effect that an Order can only be priced in a single currency.getCurrency in interface Orderpublic void setCurrency(BroadleafCurrency currency)
OrderOrder is priced in.setCurrency in interface Orderpublic int getItemCount()
OrdergetItemCount in interface Orderpublic boolean getHasOrderAdjustments()
OrdergetHasOrderAdjustments in interface Orderpublic java.lang.String getMainEntityName()
getMainEntityName in interface AdminMainEntitypublic java.lang.String getCurrencyCode()
getCurrencyCode in interface CurrencyCodeIdentifiablepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2018. All Rights Reserved.