org.broadleafcommerce.core.order.domain
Class OrderItemImpl
java.lang.Object
org.broadleafcommerce.core.order.domain.OrderItemImpl
- All Implemented Interfaces:
- Serializable, Cloneable, OrderItem
- Direct Known Subclasses:
- BundleOrderItemImpl, DiscreteOrderItemImpl
@Entity
public class OrderItemImpl
- extends Object
- implements OrderItem, Cloneable
- See Also:
- Serialized Form
id
protected Long id
category
protected Category category
order
protected Order order
retailPrice
protected BigDecimal retailPrice
salePrice
protected BigDecimal salePrice
price
protected BigDecimal price
quantity
protected int quantity
name
protected String name
personalMessage
protected PersonalMessage personalMessage
giftWrapOrderItem
protected GiftWrapOrderItem giftWrapOrderItem
orderItemAdjustments
protected List<OrderItemAdjustment> orderItemAdjustments
candidateItemOffers
protected List<CandidateItemOffer> candidateItemOffers
orderItemType
protected String orderItemType
itemTaxable
protected Boolean itemTaxable
orderItemAttributeMap
protected Map<String,OrderItemAttribute> orderItemAttributeMap
splitParentItemId
protected Long splitParentItemId
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 List<CandidateItemOffer> getCandidateItemOffers()
- Specified by:
getCandidateItemOffers in interface OrderItem
setCandidateItemOffers
public void setCandidateItemOffers(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 Long getId()
- Specified by:
getId in interface OrderItem
setId
public void setId(Long id)
- Specified by:
setId in interface OrderItem
getName
public String getName()
- Specified by:
getName in interface OrderItem
setName
public void setName(String name)
- Specified by:
setName in interface OrderItem
isInCategory
public boolean isInCategory(String categoryName)
- Specified by:
isInCategory in interface OrderItem
getOrderItemAdjustments
public 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(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
getOrderItemAttributes
public Map<String,OrderItemAttribute> getOrderItemAttributes()
- A list of arbitrary attributes added to this item.
- Specified by:
getOrderItemAttributes in interface OrderItem
setOrderItemAttributes
public void setOrderItemAttributes(Map<String,OrderItemAttribute> orderItemAttributes)
- Sets the map of order item attributes.
- Specified by:
setOrderItemAttributes in interface OrderItem
- Parameters:
orderItemAttributes -
checkCloneable
public void checkCloneable(OrderItem orderItem)
throws CloneNotSupportedException,
SecurityException,
NoSuchMethodException
- Throws:
CloneNotSupportedException
SecurityException
NoSuchMethodException
clone
public OrderItem clone()
- Specified by:
clone in interface OrderItem- Overrides:
clone in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
accept
public void accept(OrderItemVisitor visitor)
throws PricingException
- Specified by:
accept in interface OrderItem
- Throws:
PricingException
isTaxable
public Boolean isTaxable()
- Description copied from interface:
OrderItem
- Returns whether or not this item is taxable. If this flag is not set, it returns true by default
- Specified by:
isTaxable in interface OrderItem
- Returns:
- the taxable flag. If null, returns true
setTaxable
public void setTaxable(Boolean taxable)
- Description copied from interface:
OrderItem
- Sets whether or not this item is taxable
- Specified by:
setTaxable in interface OrderItem
getSplitParentItemId
public Long getSplitParentItemId()
- Description copied from interface:
OrderItem
- If the system automatically split an item to accommodate the promotion logic (e.g. buy one get one free),
then this value is set to the originalItemId.
Returns null otherwise.
- Specified by:
getSplitParentItemId in interface OrderItem
- Returns:
setSplitParentItemId
public void setSplitParentItemId(Long splitParentItemId)
- Specified by:
setSplitParentItemId in interface OrderItem
Copyright © 2012. All Rights Reserved.