org.broadleafcommerce.core.order.domain
Class OrderImpl
java.lang.Object
org.broadleafcommerce.core.order.domain.OrderImpl
- All Implemented Interfaces:
- Serializable, Order
@Entity
public class OrderImpl
- extends Object
- implements Order
- See Also:
- Serialized Form
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
OrderImpl
public OrderImpl()
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.