com.elasticpath.domain.order
Interface Order

All Superinterfaces:
Entity, EpDomain, Persistence, java.io.Serializable
All Known Implementing Classes:
OrderImpl

public interface Order
extends Entity

Order represents a customer's order.


Method Summary
 void addOrderNote(OrderNote orderNote)
          Add a order note.
 void addOrderPayment(OrderPayment orderPayment)
          Add a payment to the order.
 void addOrderSku(OrderSku orderSku)
          Add an order SKU.
 void addReturn(OrderReturn orderReturn)
          Add a return to the order.
 void addShipment(OrderShipment orderShipment)
          Add an order shipment.
 java.util.Set getAppliedRules()
          Get the set of AppliedRule objects that correspond to rules that were fired while processing this order.
 java.math.BigDecimal getBalanceAmount()
          Return the balance amount for this order.
 java.math.BigDecimal getBeforeTaxSubtotal()
          Get the order before-tax subtotal of all items in the cart.
 Money getBeforeTaxSubtotalMoney()
          Get the subtotal of all items in the cart.
 java.math.BigDecimal getBeforeTaxTotal()
          Get the order before-tax total.
 Money getBeforeTaxTotalMoney()
          Get the before-tax total of all items in the cart as Money object.
 Money getBeforeTaxTotalShippingCostMoney()
          Get the before-tax total shipping cost for this order.
 OrderAddress getBillingAddress()
          Get the billing address corresponding to this order.
 java.util.Date getCreatedDate()
          Get the date that this order was created on.
 java.math.BigDecimal getCreditAmount()
          Return the credit amount for this order.
 java.util.Currency getCurrency()
          Get the order's currency.
 Customer getCustomer()
          Get the customer corresponding to this order.
 java.lang.String getIpAddress()
          Get the ip address of the computer that created the order.
 CmUser getLastModifiedBy()
          Get the CM user who last modifed this order sku.
 java.util.Date getLastModifiedDate()
          Get the date that the order was last modified on.
 java.util.Locale getLocale()
          Get the order's locale.
 java.util.Set getOrderNotes()
          Get the CSR notes associatied with this order.
 java.lang.String getOrderNumber()
          Get the order number that is used by customers to reference their order.
 OrderPayment getOrderPayment()
          Convenience method to retrieve a default order payment for this order.
 java.util.Set getOrderPayments()
          Get the payment(s) for this order.
 java.util.Set getOrderSkus()
          Get the SKUs in this order.
 java.util.Set getOrderTaxes()
          Return the set of OrderTaxValues.
 java.math.BigDecimal getPaidAmount()
          Return the paid amount for this order.
 java.util.Set getReturns()
          Get the returns associatied with this order.
 java.util.Set getShipments()
          Get the shipments associatied with this order.
 Address getShippingAddress()
          Convenience method that should only be used when only a single shipment is supported for a single order.
 OrderStatus getStatus()
          Get the status of the order.
 java.math.BigDecimal getSubtotal()
          Get the order subtotal of all items in the cart.
 java.math.BigDecimal getSubtotalDiscount()
          Get the discount to the shopping cart subtotal.
 Money getSubtotalDiscountMoney()
          Get the amount discounted from the order subtotal.
 Money getSubtotalMoney()
          Get the subtotal of all items in the cart.
 java.math.BigDecimal getTotal()
          Get the order total paid by the customer.
 Money getTotalMoney()
          Get the sub total of all items in the cart after shipping, promotions, etc.
 Money getTotalShippingCostMoney()
          Get the total shipping cost for this order.
 java.math.BigDecimal getTotalTaxes()
          Calculate total taxes on order.
 Money getTotalTaxMoney()
          Get the total tax for this order.
 boolean hasSubtotalDiscount()
          Returns true if an order subtotal discount has been applied.
 boolean isInclusiveTaxCalculation()
          Return whether this order is based on inclusive tax calculation or not.
 void setAppliedRules(java.util.Set appliedRules)
          Set the AppliedRule objects that represent rules that were fired while processing this order.
 void setBeforeTaxSubtotal(java.math.BigDecimal beforeTaxSubtotal)
          Set the order before-tax subtotal paid by the customer.
 void setBeforeTaxTotal(java.math.BigDecimal beforeTaxTotal)
          Set the order before-tax total.
 void setBillingAddress(OrderAddress billingAddress)
          Set the billing address corresponding to this order.
 void setCreatedDate(java.util.Date createdDate)
          Set the date that the order is created.
 void setCurrency(java.util.Currency currency)
          Set the order's currency.
 void setCustomer(Customer customer)
          Set the customer corresponding to this order.
 void setInclusiveTaxCalculation(boolean inclusiveTaxCalculation)
          Set whether this order is based on inclusive tax calculation or not.
 void setIpAddress(java.lang.String ipAddress)
          Set the ip address of the computer creating the order.
 void setLastModifiedBy(CmUser lastModifiedBy)
          Set the CM User who last modified this order sku.
 void setLastModifiedDate(java.util.Date lastModifiedDate)
          Set the date that the order was last modified on.
 void setLocale(java.util.Locale locale)
          Set the order's locale.
 void setOrderNotes(java.util.Set orderNotes)
          Set the CSR Notes of this order.
 void setOrderNumber(java.lang.String orderNumber)
          Set the order number that is used by customers to reference their order.
 void setOrderPayments(java.util.Set orderPayments)
          Set the payment(s) for this order.
 void setOrderSkus(java.util.Set orderSkus)
          Set the SKUs in this order.
 void setOrderTaxes(java.util.Set orderTaxes)
          Set the set of OrderTaxValues.
 void setReturns(java.util.Set returns)
          Set the returns of this order.
 void setShipments(java.util.Set shipments)
          Set the shipments of this order.
 void setStatus(OrderStatus status)
          Set the status of the order.
 void setSubtotal(java.math.BigDecimal subtotal)
          Set the order subtotal paid by the customer.
 void setSubtotalDiscount(java.math.BigDecimal discountAmount)
          Applies a discount to the shopping cart subtotal.
 void setTotal(java.math.BigDecimal orderTotal)
          Set the order total paid by the customer.
 
Methods inherited from interface com.elasticpath.domain.Entity
getGuid, setGuid
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Method Detail

addOrderNote

void addOrderNote(OrderNote orderNote)
Add a order note.

Parameters:
orderNote - a new order note.

addOrderPayment

void addOrderPayment(OrderPayment orderPayment)
Add a payment to the order.

Parameters:
orderPayment - an OrderPayment

addOrderSku

void addOrderSku(OrderSku orderSku)
Add an order SKU.

Parameters:
orderSku - the order SKU to add

addReturn

void addReturn(OrderReturn orderReturn)
Add a return to the order.

Parameters:
orderReturn - the OrderReturn instance.

addShipment

void addShipment(OrderShipment orderShipment)
Add an order shipment.

Parameters:
orderShipment - the order shipment to add

getAppliedRules

java.util.Set getAppliedRules()
Get the set of AppliedRule objects that correspond to rules that were fired while processing this order.

Returns:
a set of AppliedRule objects

getBalanceAmount

java.math.BigDecimal getBalanceAmount()
Return the balance amount for this order.

Returns:
the balance amount for this order.

getBeforeTaxSubtotal

java.math.BigDecimal getBeforeTaxSubtotal()
Get the order before-tax subtotal of all items in the cart.

Returns:
a BigDecimal object representing the order before-tax subtotal

getBeforeTaxSubtotalMoney

Money getBeforeTaxSubtotalMoney()
Get the subtotal of all items in the cart.

Returns:
a Money object representing the subtotal

getBeforeTaxTotal

java.math.BigDecimal getBeforeTaxTotal()
Get the order before-tax total.

Returns:
a BigDecimal object representing the order before-tax total

getBeforeTaxTotalMoney

Money getBeforeTaxTotalMoney()
Get the before-tax total of all items in the cart as Money object.

Returns:
a Money object representing the before-tax total

getBeforeTaxTotalShippingCostMoney

Money getBeforeTaxTotalShippingCostMoney()
Get the before-tax total shipping cost for this order.

Returns:
a Money representing the before-tax total shipping cost

getBillingAddress

OrderAddress getBillingAddress()
Get the billing address corresponding to this order.

Returns:
the order address Uid

getCreatedDate

java.util.Date getCreatedDate()
Get the date that this order was created on.

Returns:
the created date

getCreditAmount

java.math.BigDecimal getCreditAmount()
Return the credit amount for this order.

Returns:
the credit amount for this order.

getCurrency

java.util.Currency getCurrency()
Get the order's currency.

Returns:
the Currency

getCustomer

Customer getCustomer()
Get the customer corresponding to this order.

Returns:
the customer Uid

getIpAddress

java.lang.String getIpAddress()
Get the ip address of the computer that created the order.

Returns:
the ip address

getLastModifiedBy

CmUser getLastModifiedBy()
Get the CM user who last modifed this order sku.

Returns:
the CM user Disabled: hibernate.property column="LAST_MODIFIED_BY" type="java.util.Date"

getLastModifiedDate

java.util.Date getLastModifiedDate()
Get the date that the order was last modified on.

Returns:
the last modified date

getLocale

java.util.Locale getLocale()
Get the order's locale.

Returns:
the Locale

getOrderNotes

java.util.Set getOrderNotes()
Get the CSR notes associatied with this order.

Returns:
the orders's OrderNotes

getOrderNumber

java.lang.String getOrderNumber()
Get the order number that is used by customers to reference their order.

Returns:
the order number

getOrderPayment

OrderPayment getOrderPayment()
Convenience method to retrieve a default order payment for this order. This should only be used when only a single payment is supported for a single order.

Returns:
the first order payment for this Order

getOrderPayments

java.util.Set getOrderPayments()
Get the payment(s) for this order.

Returns:
a set of OrderPayment objects

getOrderSkus

java.util.Set getOrderSkus()
Get the SKUs in this order.

Returns:
the orders's OrderSkuss

getOrderTaxes

java.util.Set getOrderTaxes()
Return the set of OrderTaxValues.

Returns:
the set of OrderTaxValues.

getPaidAmount

java.math.BigDecimal getPaidAmount()
Return the paid amount for this order.

Returns:
the paid amount for this order.

getReturns

java.util.Set getReturns()
Get the returns associatied with this order.

Returns:
the orders's OrderReturns

getShipments

java.util.Set getShipments()
Get the shipments associatied with this order.

Returns:
the orders's OrderShipments

getShippingAddress

Address getShippingAddress()
Convenience method that should only be used when only a single shipment is supported for a single order.

Returns:
The shipping address of one of this order's shipments

getStatus

OrderStatus getStatus()
Get the status of the order.

Returns:
the order status

getSubtotal

java.math.BigDecimal getSubtotal()
Get the order subtotal of all items in the cart.

Returns:
a BigDecimal object representing the order subtotal

getSubtotalDiscount

java.math.BigDecimal getSubtotalDiscount()
Get the discount to the shopping cart subtotal.

Returns:
the amount discounted from the subtotal

getSubtotalDiscountMoney

Money getSubtotalDiscountMoney()
Get the amount discounted from the order subtotal.

Returns:
the order subtotal discount as a Money object

getSubtotalMoney

Money getSubtotalMoney()
Get the subtotal of all items in the cart.

Returns:
a Money object representing the subtotal

getTotal

java.math.BigDecimal getTotal()
Get the order total paid by the customer.

Returns:
the order total

getTotalMoney

Money getTotalMoney()
Get the sub total of all items in the cart after shipping, promotions, etc.

Returns:
a Money object representing the total

getTotalShippingCostMoney

Money getTotalShippingCostMoney()
Get the total shipping cost for this order.

Returns:
a Money representing the total shipping cost

getTotalTaxes

java.math.BigDecimal getTotalTaxes()
Calculate total taxes on order. Iterate thru order taxes.

Returns:
total taxes on order.

getTotalTaxMoney

Money getTotalTaxMoney()
Get the total tax for this order.

Returns:
a Money object representing the total tax

hasSubtotalDiscount

boolean hasSubtotalDiscount()
Returns true if an order subtotal discount has been applied.

Returns:
true if an order subtotal discount has been applied

isInclusiveTaxCalculation

boolean isInclusiveTaxCalculation()
Return whether this order is based on inclusive tax calculation or not.

Returns:
true if this order is based on inclusive tax calculation; otherwise, false.

setAppliedRules

void setAppliedRules(java.util.Set appliedRules)
Set the AppliedRule objects that represent rules that were fired while processing this order.

Parameters:
appliedRules - a set of AppliedRule objects

setBeforeTaxSubtotal

void setBeforeTaxSubtotal(java.math.BigDecimal beforeTaxSubtotal)
Set the order before-tax subtotal paid by the customer.

Parameters:
beforeTaxSubtotal - the order before-tax subtotal

setBeforeTaxTotal

void setBeforeTaxTotal(java.math.BigDecimal beforeTaxTotal)
Set the order before-tax total.

Parameters:
beforeTaxTotal - the order before-tax total

setBillingAddress

void setBillingAddress(OrderAddress billingAddress)
Set the billing address corresponding to this order.

Parameters:
billingAddress - the Uid of the corresponding order address.

setCreatedDate

void setCreatedDate(java.util.Date createdDate)
Set the date that the order is created.

Parameters:
createdDate - the start date

setCurrency

void setCurrency(java.util.Currency currency)
Set the order's currency.

Parameters:
currency - the Currency

setCustomer

void setCustomer(Customer customer)
Set the customer corresponding to this order.

Parameters:
customer - the Uid of the corresponding customer.

setInclusiveTaxCalculation

void setInclusiveTaxCalculation(boolean inclusiveTaxCalculation)
Set whether this order is based on inclusive tax calculation or not.

Parameters:
inclusiveTaxCalculation - true if this order is based on inclusive tax calculation; otherwise, false.

setIpAddress

void setIpAddress(java.lang.String ipAddress)
Set the ip address of the computer creating the order.

Parameters:
ipAddress - the ip address of the creating computer

setLastModifiedBy

void setLastModifiedBy(CmUser lastModifiedBy)
Set the CM User who last modified this order sku.

Parameters:
lastModifiedBy - the CM user

setLastModifiedDate

void setLastModifiedDate(java.util.Date lastModifiedDate)
Set the date that the order was last modified on.

Parameters:
lastModifiedDate - the date that the order was last modified

setLocale

void setLocale(java.util.Locale locale)
Set the order's locale.

Parameters:
locale - the Locale

setOrderNotes

void setOrderNotes(java.util.Set orderNotes)
Set the CSR Notes of this order.

Parameters:
orderNotes - the set of OrderNotes

setOrderNumber

void setOrderNumber(java.lang.String orderNumber)
Set the order number that is used by customers to reference their order.

Parameters:
orderNumber - the order number, which may include characters.

setOrderPayments

void setOrderPayments(java.util.Set orderPayments)
Set the payment(s) for this order.

Parameters:
orderPayments - a set of OrderPayment objects.

setOrderSkus

void setOrderSkus(java.util.Set orderSkus)
Set the SKUs in this order.

Parameters:
orderSkus - the set of OrderSkus

setOrderTaxes

void setOrderTaxes(java.util.Set orderTaxes)
Set the set of OrderTaxValues.

Parameters:
orderTaxes - - set of OrderTaxValues.

setReturns

void setReturns(java.util.Set returns)
Set the returns of this order.

Parameters:
returns - the set of OrderReturns

setShipments

void setShipments(java.util.Set shipments)
Set the shipments of this order.

Parameters:
shipments - the set of OrderShipments

setStatus

void setStatus(OrderStatus status)
Set the status of the order.

Parameters:
status - the status of the order

setSubtotal

void setSubtotal(java.math.BigDecimal subtotal)
Set the order subtotal paid by the customer.

Parameters:
subtotal - the order subtotal

setSubtotalDiscount

void setSubtotalDiscount(java.math.BigDecimal discountAmount)
Applies a discount to the shopping cart subtotal.

Parameters:
discountAmount - the amount to discount the subtotal by as a BigInteger

setTotal

void setTotal(java.math.BigDecimal orderTotal)
Set the order total paid by the customer.

Parameters:
orderTotal - the order total