org.broadleafcommerce.core.order.domain
Class OrderImpl

java.lang.Object
  extended by org.broadleafcommerce.core.order.domain.OrderImpl
All Implemented Interfaces:
Serializable, Order

@Entity
public class OrderImpl
extends Object
implements Order

See Also:
Serialized Form

Field Summary
protected  List<OfferCode> addedOfferCodes
           
protected  Map<Offer,OfferInfo> additionalOfferInformation
           
protected  Auditable auditable
           
protected  List<CandidateOrderOffer> candidateOrderOffers
           
protected  BigDecimal cityTax
           
protected  BigDecimal countryTax
           
protected  BigDecimal countyTax
           
protected  Customer customer
           
protected  BigDecimal districtTax
           
protected  String emailAddress
           
protected  List<FulfillmentGroup> fulfillmentGroups
           
protected  Long id
           
protected  String name
           
protected  List<OrderAdjustment> orderAdjustments
           
protected  List<OrderItem> orderItems
           
protected  List<PaymentInfo> paymentInfos
           
protected  BigDecimal stateTax
           
protected  String status
           
protected  Date submitDate
           
protected  BigDecimal subTotal
           
protected  BigDecimal total
           
protected  BigDecimal totalShipping
           
protected  BigDecimal totalTax
           
 
Constructor Summary
OrderImpl()
           
 
Method Summary
 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 calculateOrderItemsFinalPrice(boolean includeNonTaxableItems)
           
 boolean equals(Object obj)
           
 List<OfferCode> getAddedOfferCodes()
           
 Map<Offer,OfferInfo> getAdditionalOfferInformation()
           
 Auditable getAuditable()
           
 List<CandidateOrderOffer> getCandidateOrderOffers()
           
 Money getCityTax()
           
 Money getCountryTax()
           
 Money getCountyTax()
           
 Customer getCustomer()
           
 List<DiscreteOrderItem> getDiscreteOrderItems()
           
 Money getDistrictTax()
           
 String getEmailAddress()
           
 Money getFulfillmentGroupAdjustmentsValue()
           
 List<FulfillmentGroup> getFulfillmentGroups()
           
 String getFulfillmentStatus()
           
 Long getId()
           
 Money getItemAdjustmentsValue()
          Returns the discount value of all the applied item offers for this order.
 String getName()
           
 List<OrderAdjustment> getOrderAdjustments()
          Returns a unmodifiable List of OrderAdjustment.
 Money getOrderAdjustmentsValue()
          Returns the discount value of all the applied order offers.
 List<OrderItem> getOrderItems()
           
 String getOrderNumber()
           
 List<PaymentInfo> getPaymentInfos()
           
 Money getRemainingTotal()
           
 Money getStateTax()
           
 OrderStatus getStatus()
           
 Date getSubmitDate()
           
 Money getSubTotal()
          Returns the subtotal price for the order.
 Money getTotal()
           
 Money getTotalAdjustmentsValue()
          Returns the total discount value for all applied item and order offers in the order.
 Money getTotalShipping()
           
 Money getTotalTax()
           
 boolean hasCategoryItem(String categoryName)
           
 int hashCode()
           
 void setAdditionalOfferInformation(Map<Offer,OfferInfo> additionalOfferInformation)
           
 void setAuditable(Auditable auditable)
           
 void setCandidateOrderOffers(List<CandidateOrderOffer> candidateOrderOffers)
           
 void setCityTax(Money cityTax)
           
 void setCountryTax(Money countryTax)
           
 void setCountyTax(Money countyTax)
           
 void setCustomer(Customer customer)
           
 void setDistrictTax(Money districtTax)
           
 void setEmailAddress(String emailAddress)
           
 void setFulfillmentGroups(List<FulfillmentGroup> fulfillmentGroups)
           
 void setId(Long id)
           
 void setName(String name)
           
protected  void setOrderAdjustments(List<OrderAdjustment> orderAdjustments)
           
 void setOrderItems(List<OrderItem> orderItems)
           
 void setOrderNumber(String orderNumber)
           
 void setPaymentInfos(List<PaymentInfo> paymentInfos)
           
 void setStateTax(Money stateTax)
           
 void setStatus(OrderStatus status)
           
 void setSubmitDate(Date submitDate)
           
 void setSubTotal(Money subTotal)
          Sets the subtotal price for the order.
 void setTotal(Money orderTotal)
           
 void setTotalShipping(Money totalShipping)
           
 void setTotalTax(Money totalTax)
           
 boolean updatePrices()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected Long id

auditable

protected Auditable auditable

name

protected String name

customer

protected Customer customer

status

protected String status

cityTax

protected BigDecimal cityTax

countyTax

protected BigDecimal countyTax

stateTax

protected BigDecimal stateTax

districtTax

protected BigDecimal districtTax

countryTax

protected BigDecimal countryTax

totalTax

protected BigDecimal totalTax

totalShipping

protected BigDecimal totalShipping

subTotal

protected BigDecimal subTotal

total

protected BigDecimal total

submitDate

protected Date submitDate

emailAddress

protected String emailAddress

orderItems

protected List<OrderItem> orderItems

fulfillmentGroups

protected List<FulfillmentGroup> fulfillmentGroups

orderAdjustments

protected List<OrderAdjustment> orderAdjustments

addedOfferCodes

protected List<OfferCode> addedOfferCodes

candidateOrderOffers

protected List<CandidateOrderOffer> candidateOrderOffers

paymentInfos

protected List<PaymentInfo> paymentInfos

additionalOfferInformation

protected Map<Offer,OfferInfo> additionalOfferInformation
Constructor Detail

OrderImpl

public OrderImpl()
Method Detail

getId

public Long getId()
Specified by:
getId in interface Order

setId

public void setId(Long id)
Specified by:
setId in interface Order

getAuditable

public Auditable getAuditable()
Specified by:
getAuditable in interface Order

setAuditable

public void setAuditable(Auditable auditable)
Specified by:
setAuditable in interface Order

getSubTotal

public Money getSubTotal()
Description copied from interface: Order
Returns the subtotal price for the order. The subtotal price is the price of all order items with item offers applied. The subtotal does not take into account the order offers.

Specified by:
getSubTotal in interface Order
Returns:
the total item price with offers applied

setSubTotal

public void setSubTotal(Money subTotal)
Description copied from interface: Order
Sets the subtotal price for the order. The subtotal price is the price of all order items with item offers applied. The subtotal does not take into account the order offers.

Specified by:
setSubTotal in interface Order

calculateOrderItemsFinalPrice

public Money calculateOrderItemsFinalPrice(boolean includeNonTaxableItems)
Specified by:
calculateOrderItemsFinalPrice in interface Order

assignOrderItemsFinalPrice

public void assignOrderItemsFinalPrice()
Assigns a final price to all the order items

Specified by:
assignOrderItemsFinalPrice in interface Order

getTotal

public Money getTotal()
Specified by:
getTotal in interface Order

setTotal

public void setTotal(Money orderTotal)
Specified by:
setTotal in interface Order

getRemainingTotal

public Money getRemainingTotal()
Specified by:
getRemainingTotal in interface Order

getSubmitDate

public Date getSubmitDate()
Specified by:
getSubmitDate in interface Order

setSubmitDate

public void setSubmitDate(Date submitDate)
Specified by:
setSubmitDate in interface Order

getCustomer

public Customer getCustomer()
Specified by:
getCustomer in interface Order

setCustomer

public void setCustomer(Customer customer)
Specified by:
setCustomer in interface Order

getStatus

public OrderStatus getStatus()
Specified by:
getStatus in interface Order

setStatus

public void setStatus(OrderStatus status)
Specified by:
setStatus in interface Order

getOrderItems

public List<OrderItem> getOrderItems()
Specified by:
getOrderItems in interface Order

setOrderItems

public void setOrderItems(List<OrderItem> orderItems)
Specified by:
setOrderItems in interface Order

addOrderItem

public void addOrderItem(OrderItem orderItem)
Specified by:
addOrderItem in interface Order

getFulfillmentGroups

public List<FulfillmentGroup> getFulfillmentGroups()
Specified by:
getFulfillmentGroups in interface Order

setFulfillmentGroups

public void setFulfillmentGroups(List<FulfillmentGroup> fulfillmentGroups)
Specified by:
setFulfillmentGroups in interface Order

setCandidateOrderOffers

public void setCandidateOrderOffers(List<CandidateOrderOffer> candidateOrderOffers)
Specified by:
setCandidateOrderOffers in interface Order

getCandidateOrderOffers

public List<CandidateOrderOffer> getCandidateOrderOffers()
Specified by:
getCandidateOrderOffers in interface Order

getName

public String getName()
Specified by:
getName in interface Order

setName

public void setName(String name)
Specified by:
setName in interface Order

getCityTax

public Money getCityTax()
Specified by:
getCityTax in interface Order

setCityTax

public void setCityTax(Money cityTax)
Specified by:
setCityTax in interface Order

getCountyTax

public Money getCountyTax()
Specified by:
getCountyTax in interface Order

setCountyTax

public void setCountyTax(Money countyTax)
Specified by:
setCountyTax in interface Order

getStateTax

public Money getStateTax()
Specified by:
getStateTax in interface Order

setStateTax

public void setStateTax(Money stateTax)
Specified by:
setStateTax in interface Order

getDistrictTax

public Money getDistrictTax()
Specified by:
getDistrictTax in interface Order

setDistrictTax

public void setDistrictTax(Money districtTax)
Specified by:
setDistrictTax in interface Order

getCountryTax

public Money getCountryTax()
Specified by:
getCountryTax in interface Order

setCountryTax

public void setCountryTax(Money countryTax)
Specified by:
setCountryTax in interface Order

getTotalTax

public Money getTotalTax()
Specified by:
getTotalTax in interface Order

setTotalTax

public void setTotalTax(Money totalTax)
Specified by:
setTotalTax in interface Order

getTotalShipping

public Money getTotalShipping()
Specified by:
getTotalShipping in interface Order

setTotalShipping

public void setTotalShipping(Money totalShipping)
Specified by:
setTotalShipping in interface Order

getPaymentInfos

public List<PaymentInfo> getPaymentInfos()
Specified by:
getPaymentInfos in interface Order

setPaymentInfos

public void setPaymentInfos(List<PaymentInfo> paymentInfos)
Specified by:
setPaymentInfos in interface Order

hasCategoryItem

public boolean hasCategoryItem(String categoryName)
Specified by:
hasCategoryItem in interface Order

getOrderAdjustments

public List<OrderAdjustment> getOrderAdjustments()
Description copied from interface: Order
Returns a unmodifiable List of OrderAdjustment. To modify the List of OrderAdjustment, please use the addOrderAdjustments or removeAllOrderAdjustments methods.

Specified by:
getOrderAdjustments in interface Order
Returns:
a unmodifiable List of OrderItemAdjustment

setOrderAdjustments

protected void setOrderAdjustments(List<OrderAdjustment> orderAdjustments)

getDiscreteOrderItems

public List<DiscreteOrderItem> getDiscreteOrderItems()
Specified by:
getDiscreteOrderItems in interface Order

getAddedOfferCodes

public List<OfferCode> getAddedOfferCodes()
Specified by:
getAddedOfferCodes in interface Order

getOrderNumber

public String getOrderNumber()
Specified by:
getOrderNumber in interface Order

setOrderNumber

public void setOrderNumber(String orderNumber)
Specified by:
setOrderNumber in interface Order

getFulfillmentStatus

public String getFulfillmentStatus()
Specified by:
getFulfillmentStatus in interface Order

getEmailAddress

public String getEmailAddress()
Specified by:
getEmailAddress in interface Order

setEmailAddress

public void setEmailAddress(String emailAddress)
Specified by:
setEmailAddress in interface Order

getAdditionalOfferInformation

public Map<Offer,OfferInfo> getAdditionalOfferInformation()
Specified by:
getAdditionalOfferInformation in interface Order

setAdditionalOfferInformation

public void setAdditionalOfferInformation(Map<Offer,OfferInfo> additionalOfferInformation)
Specified by:
setAdditionalOfferInformation in interface Order

getItemAdjustmentsValue

public Money getItemAdjustmentsValue()
Description copied from interface: Order
Returns the discount value of all the applied item offers for this order. The value is already deducted from the order subTotal.

Specified by:
getItemAdjustmentsValue in interface Order
Returns:
the discount value of all the applied item offers for this order

getFulfillmentGroupAdjustmentsValue

public Money getFulfillmentGroupAdjustmentsValue()
Specified by:
getFulfillmentGroupAdjustmentsValue in interface Order

getOrderAdjustmentsValue

public Money getOrderAdjustmentsValue()
Description copied from interface: Order
Returns the discount value of all the applied order offers. The value returned from this method should be subtracted from the getSubTotal() to get the order price with all item and order offers applied.

Specified by:
getOrderAdjustmentsValue in interface Order
Returns:
the discount value of all applied order offers.

getTotalAdjustmentsValue

public Money getTotalAdjustmentsValue()
Description copied from interface: Order
Returns the total discount value for all applied item and order offers in the order. The return value should not be used with getSubTotal() to calculate the final price, since getSubTotal() already takes into account the applied item offers.

Specified by:
getTotalAdjustmentsValue in interface Order
Returns:
the total discount of all applied item and order offers

updatePrices

public boolean updatePrices()
Specified by:
updatePrices in interface Order

addAddedOfferCode

@Deprecated
public void addAddedOfferCode(OfferCode offerCode)
Deprecated. 

Specified by:
addAddedOfferCode in interface Order

addOfferCode

public void addOfferCode(OfferCode offerCode)
Specified by:
addOfferCode in interface Order

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012. All Rights Reserved.