org.broadleafcommerce.core.order.domain
Class OrderItemImpl
java.lang.Object
org.broadleafcommerce.core.order.domain.OrderItemImpl
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, OrderItem
- Direct Known Subclasses:
- BundleOrderItemImpl, DiscreteOrderItemImpl
@Entity
public class OrderItemImpl
- extends java.lang.Object
- implements OrderItem, java.lang.Cloneable
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
id
protected java.lang.Long id
category
protected Category category
order
protected Order order
retailPrice
protected java.math.BigDecimal retailPrice
salePrice
protected java.math.BigDecimal salePrice
price
protected java.math.BigDecimal price
quantity
protected int quantity
name
protected java.lang.String name
personalMessage
protected PersonalMessage personalMessage
giftWrapOrderItem
protected GiftWrapOrderItem giftWrapOrderItem
orderItemAdjustments
protected java.util.List<OrderItemAdjustment> orderItemAdjustments
candidateItemOffers
protected java.util.List<CandidateItemOffer> candidateItemOffers
orderItemType
protected java.lang.String orderItemType
OrderItemImpl
public OrderItemImpl()
getRetailPrice
public Money getRetailPrice()
- Specified by:
getRetailPrice in interface OrderItem
setRetailPrice
public void setRetailPrice(Money retailPrice)
- Specified by:
setRetailPrice in interface OrderItem
getSalePrice
public Money getSalePrice()
- Specified by:
getSalePrice in interface OrderItem
setSalePrice
public void setSalePrice(Money salePrice)
- Specified by:
setSalePrice in interface OrderItem
getPrice
public Money getPrice()
- Specified by:
getPrice in interface OrderItem
setPrice
public void setPrice(Money finalPrice)
- Specified by:
setPrice in interface OrderItem
getTaxablePrice
public Money getTaxablePrice()
- Specified by:
getTaxablePrice in interface OrderItem
getQuantity
public int getQuantity()
- Specified by:
getQuantity in interface OrderItem
setQuantity
public void setQuantity(int quantity)
- Specified by:
setQuantity in interface OrderItem
getCategory
public Category getCategory()
- Specified by:
getCategory in interface OrderItem
setCategory
public void setCategory(Category category)
- Specified by:
setCategory in interface OrderItem
getCandidateItemOffers
public java.util.List<CandidateItemOffer> getCandidateItemOffers()
- Specified by:
getCandidateItemOffers in interface OrderItem
setCandidateItemOffers
public void setCandidateItemOffers(java.util.List<CandidateItemOffer> candidateItemOffers)
- Specified by:
setCandidateItemOffers in interface OrderItem
getPersonalMessage
public PersonalMessage getPersonalMessage()
- Specified by:
getPersonalMessage in interface OrderItem
setPersonalMessage
public void setPersonalMessage(PersonalMessage personalMessage)
- Specified by:
setPersonalMessage in interface OrderItem
getOrder
public Order getOrder()
- Specified by:
getOrder in interface OrderItem
setOrder
public void setOrder(Order order)
- Specified by:
setOrder in interface OrderItem
getId
public java.lang.Long getId()
- Specified by:
getId in interface OrderItem
setId
public void setId(java.lang.Long id)
- Specified by:
setId in interface OrderItem
getName
public java.lang.String getName()
- Specified by:
getName in interface OrderItem
setName
public void setName(java.lang.String name)
- Specified by:
setName in interface OrderItem
isInCategory
public boolean isInCategory(java.lang.String categoryName)
- Specified by:
isInCategory in interface OrderItem
getOrderItemAdjustments
public java.util.List<OrderItemAdjustment> getOrderItemAdjustments()
- Description copied from interface:
OrderItem
- Returns a unmodifiable List of OrderItemAdjustment. To modify the List of OrderItemAdjustment, please
use the addOrderItemAdjustment or removeAllAdjustments methods.
- Specified by:
getOrderItemAdjustments in interface OrderItem
- Returns:
- a unmodifiable List of OrderItemAdjustment
setOrderItemAdjustments
public void setOrderItemAdjustments(java.util.List<OrderItemAdjustment> orderItemAdjustments)
- Specified by:
setOrderItemAdjustments in interface OrderItem
getAdjustmentValue
public Money getAdjustmentValue()
- Specified by:
getAdjustmentValue in interface OrderItem
getGiftWrapOrderItem
public GiftWrapOrderItem getGiftWrapOrderItem()
- Specified by:
getGiftWrapOrderItem in interface OrderItem
setGiftWrapOrderItem
public void setGiftWrapOrderItem(GiftWrapOrderItem giftWrapOrderItem)
- Specified by:
setGiftWrapOrderItem in interface OrderItem
getOrderItemType
public OrderItemType getOrderItemType()
- Specified by:
getOrderItemType in interface OrderItem
setOrderItemType
public void setOrderItemType(OrderItemType orderItemType)
- Specified by:
setOrderItemType in interface OrderItem
getIsOnSale
public boolean getIsOnSale()
- Specified by:
getIsOnSale in interface OrderItem
getIsDiscounted
public boolean getIsDiscounted()
- Specified by:
getIsDiscounted in interface OrderItem
updatePrices
public boolean updatePrices()
- Specified by:
updatePrices in interface OrderItem
assignFinalPrice
public void assignFinalPrice()
- Specified by:
assignFinalPrice in interface OrderItem
getCurrentPrice
public Money getCurrentPrice()
- Specified by:
getCurrentPrice in interface OrderItem
getPriceBeforeAdjustments
public Money getPriceBeforeAdjustments(boolean allowSalesPrice)
- Specified by:
getPriceBeforeAdjustments in interface OrderItem
addCandidateItemOffer
public void addCandidateItemOffer(CandidateItemOffer candidateItemOffer)
- Specified by:
addCandidateItemOffer in interface OrderItem
removeAllCandidateItemOffers
public void removeAllCandidateItemOffers()
- Specified by:
removeAllCandidateItemOffers in interface OrderItem
removeAllAdjustments
public int removeAllAdjustments()
- Description copied from interface:
OrderItem
- Removes all adjustment for this order item and reset the adjustment price.
- Specified by:
removeAllAdjustments in interface OrderItem
checkCloneable
public void checkCloneable(OrderItem orderItem)
throws java.lang.CloneNotSupportedException,
java.lang.SecurityException,
java.lang.NoSuchMethodException
- Throws:
java.lang.CloneNotSupportedException
java.lang.SecurityException
java.lang.NoSuchMethodException
clone
public OrderItem clone()
- Specified by:
clone in interface OrderItem- Overrides:
clone in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
accept
public void accept(OrderItemVisitor visitor)
throws PricingException
- Specified by:
accept in interface OrderItem
- Throws:
PricingException
Copyright © 2012. All Rights Reserved.