|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.elasticpath.domain.impl.AbstractEpDomainImpl
com.elasticpath.domain.impl.AbstractPersistenceImpl
com.elasticpath.domain.impl.AbstractEntityImpl
com.elasticpath.domain.order.impl.OrderImpl
public class OrderImpl
The default implementation of Order
.
Field Summary | |
---|---|
static long |
serialVersionUID
Serial version id. |
Constructor Summary | |
---|---|
OrderImpl()
|
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. |
void |
executeBeforePersistAction()
Update the last modified date. |
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 before-tax 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 |
getGuid()
Return the guid. |
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 OrderTaxValue s. |
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 sub total of all items in the cart after shipping, promotions, etc. |
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 orderBillingAddress)
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 |
setDefaultValues()
Set default values for those fields need default values. |
void |
setGuid(java.lang.String guid)
Set the guid. |
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 oder'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 OrderTaxValue s. |
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 class com.elasticpath.domain.impl.AbstractEntityImpl |
---|
convertAttributeGroupAttributes |
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl |
---|
getUidPk, isPersistent, setUidPk |
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.domain.Persistence |
---|
getUidPk, isPersistent, setUidPk |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public OrderImpl()
Method Detail |
---|
public void addOrderNote(OrderNote orderNote)
addOrderNote
in interface Order
orderNote
- a new order note.public void addOrderPayment(OrderPayment orderPayment)
addOrderPayment
in interface Order
orderPayment
- an OrderPayment
public void addOrderSku(OrderSku orderSku)
addOrderSku
in interface Order
orderSku
- the order SKU to addpublic void addReturn(OrderReturn orderReturn)
addReturn
in interface Order
orderReturn
- the OrderReturn
instance.public void addShipment(OrderShipment orderShipment)
addShipment
in interface Order
orderShipment
- the order shipment to addpublic void executeBeforePersistAction()
executeBeforePersistAction
in interface Persistence
executeBeforePersistAction
in class AbstractPersistenceImpl
public java.util.Set getAppliedRules()
AppliedRule
objects that correspond to rules that were fired while processing this order.
getAppliedRules
in interface Order
AppliedRule
objectspublic java.math.BigDecimal getBalanceAmount()
getBalanceAmount
in interface Order
public java.math.BigDecimal getBeforeTaxSubtotal()
getBeforeTaxSubtotal
in interface Order
BigDecimal
object representing the order before-tax subtotalpublic Money getBeforeTaxSubtotalMoney()
getBeforeTaxSubtotalMoney
in interface Order
Money
object representing the before-tax subtotalpublic java.math.BigDecimal getBeforeTaxTotal()
getBeforeTaxTotal
in interface Order
BigDecimal
object representing the order before-tax totalpublic Money getBeforeTaxTotalMoney()
getBeforeTaxTotalMoney
in interface Order
Money
object representing the before-tax totalpublic Money getBeforeTaxTotalShippingCostMoney()
getBeforeTaxTotalShippingCostMoney
in interface Order
Money
representing the before-tax total shipping costpublic OrderAddress getBillingAddress()
getBillingAddress
in interface Order
public java.util.Date getCreatedDate()
getCreatedDate
in interface Order
public java.math.BigDecimal getCreditAmount()
getCreditAmount
in interface Order
public java.util.Currency getCurrency()
getCurrency
in interface Order
Currency
public Customer getCustomer()
getCustomer
in interface Order
public java.lang.String getGuid()
getGuid
in interface Entity
getGuid
in class AbstractEntityImpl
public java.lang.String getIpAddress()
getIpAddress
in interface Order
public CmUser getLastModifiedBy()
getLastModifiedBy
in interface Order
public java.util.Date getLastModifiedDate()
getLastModifiedDate
in interface Order
public java.util.Locale getLocale()
getLocale
in interface Order
Locale
public java.util.Set getOrderNotes()
getOrderNotes
in interface Order
OrderNote
spublic java.lang.String getOrderNumber()
getOrderNumber
in interface Order
public OrderPayment getOrderPayment()
getOrderPayment
in interface Order
public java.util.Set getOrderPayments()
getOrderPayments
in interface Order
OrderPayment
objectspublic java.util.Set getOrderSkus()
getOrderSkus
in interface Order
OrderSkus
spublic java.util.Set getOrderTaxes()
OrderTaxValue
s.
getOrderTaxes
in interface Order
OrderTaxValue
s.public java.math.BigDecimal getPaidAmount()
getPaidAmount
in interface Order
public java.util.Set getReturns()
getReturns
in interface Order
OrderReturn
spublic java.util.Set getShipments()
getShipments
in interface Order
OrderShipment
spublic Address getShippingAddress()
getShippingAddress
in interface Order
public OrderStatus getStatus()
getStatus
in interface Order
public java.math.BigDecimal getSubtotal()
getSubtotal
in interface Order
BigDecimal
object representing the order subtotalpublic java.math.BigDecimal getSubtotalDiscount()
getSubtotalDiscount
in interface Order
public Money getSubtotalDiscountMoney()
getSubtotalDiscountMoney
in interface Order
Money
object representing the totalpublic Money getSubtotalMoney()
getSubtotalMoney
in interface Order
Money
object representing the subtotalpublic java.math.BigDecimal getTotal()
getTotal
in interface Order
public Money getTotalMoney()
getTotalMoney
in interface Order
Money
object representing the totalpublic Money getTotalShippingCostMoney()
getTotalShippingCostMoney
in interface Order
Money
representing the total shipping costpublic java.math.BigDecimal getTotalTaxes()
getTotalTaxes
in interface Order
public Money getTotalTaxMoney()
getTotalTaxMoney
in interface Order
Money
object representing the total taxpublic boolean hasSubtotalDiscount()
hasSubtotalDiscount
in interface Order
public boolean isInclusiveTaxCalculation()
isInclusiveTaxCalculation
in interface Order
public void setAppliedRules(java.util.Set appliedRules)
AppliedRule
objects that represent rules that were fired while processing this order.
setAppliedRules
in interface Order
appliedRules
- a set of AppliedRule
objectspublic void setBeforeTaxSubtotal(java.math.BigDecimal beforeTaxSubtotal)
setBeforeTaxSubtotal
in interface Order
beforeTaxSubtotal
- the order before-tax sub-totalpublic void setBeforeTaxTotal(java.math.BigDecimal beforeTaxTotal)
setBeforeTaxTotal
in interface Order
beforeTaxTotal
- the order before-tax totalpublic void setBillingAddress(OrderAddress orderBillingAddress)
setBillingAddress
in interface Order
orderBillingAddress
- the Uid of the corresponding order address.public void setCreatedDate(java.util.Date createdDate)
setCreatedDate
in interface Order
createdDate
- the start datepublic void setCurrency(java.util.Currency currency)
setCurrency
in interface Order
currency
- the Currency
public void setCustomer(Customer customer)
setCustomer
in interface Order
customer
- the Uid of the corresponding customer.public void setDefaultValues()
setDefaultValues
in interface Persistence
setDefaultValues
in class AbstractEntityImpl
public void setGuid(java.lang.String guid)
setGuid
in interface Entity
setGuid
in class AbstractEntityImpl
guid
- the guid to set.public void setInclusiveTaxCalculation(boolean inclusiveTaxCalculation)
setInclusiveTaxCalculation
in interface Order
inclusiveTaxCalculation
- true if this order is based on inclusive tax calculation; otherwise, false.public void setIpAddress(java.lang.String ipAddress)
setIpAddress
in interface Order
ipAddress
- the ip address of the creating computerpublic void setLastModifiedBy(CmUser lastModifiedBy)
setLastModifiedBy
in interface Order
lastModifiedBy
- the CM userpublic void setLastModifiedDate(java.util.Date lastModifiedDate)
setLastModifiedDate
in interface Order
lastModifiedDate
- the date that the order was last modifiedpublic void setLocale(java.util.Locale locale)
setLocale
in interface Order
locale
- the Locale
public void setOrderNotes(java.util.Set orderNotes)
setOrderNotes
in interface Order
orderNotes
- the set of OrderNote
spublic void setOrderNumber(java.lang.String orderNumber)
setOrderNumber
in interface Order
orderNumber
- the order number, which may include characters.public void setOrderPayments(java.util.Set orderPayments)
setOrderPayments
in interface Order
orderPayments
- a set of OrderPayment
objects.public void setOrderSkus(java.util.Set orderSkus)
setOrderSkus
in interface Order
orderSkus
- the set of OrderSku
spublic void setOrderTaxes(java.util.Set orderTaxes)
OrderTaxValue
s.
setOrderTaxes
in interface Order
orderTaxes
- - set of OrderTaxValue
s.public void setReturns(java.util.Set returns)
setReturns
in interface Order
returns
- the set of OrderReturn
spublic void setShipments(java.util.Set shipments)
setShipments
in interface Order
shipments
- the set of OrderShipment
spublic void setStatus(OrderStatus status)
setStatus
in interface Order
status
- the status of the orderpublic void setSubtotal(java.math.BigDecimal subtotal)
setSubtotal
in interface Order
subtotal
- the order subtotalpublic void setSubtotalDiscount(java.math.BigDecimal discountAmount)
setSubtotalDiscount
in interface Order
discountAmount
- the amount to discount the subtotal by as a BigIntegerpublic void setTotal(java.math.BigDecimal orderTotal)
setTotal
in interface Order
orderTotal
- the order total
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |