org.broadleafcommerce.core.order.domain
Class OrderItemPriceDetailImpl

java.lang.Object
  extended by org.broadleafcommerce.core.order.domain.OrderItemPriceDetailImpl
All Implemented Interfaces:
Serializable, CurrencyCodeIdentifiable, OrderItemPriceDetail

@Entity
public class OrderItemPriceDetailImpl
extends Object
implements OrderItemPriceDetail, CurrencyCodeIdentifiable

See Also:
Serialized Form

Field Summary
protected  Long id
           
protected  OrderItem orderItem
           
protected  List<OrderItemPriceDetailAdjustment> orderItemPriceDetailAdjustments
           
protected  int quantity
           
protected  Boolean useSalePrice
           
 
Constructor Summary
OrderItemPriceDetailImpl()
           
 
Method Summary
 Money getAdjustmentValue()
          Returns the value of all adjustments for a single quantity of the item.
protected  BroadleafCurrency getCurrency()
           
 String getCurrencyCode()
           
 Long getId()
          The unique identifier of this OrderItem
 OrderItem getOrderItem()
          Reference back to the containing orderItem.
 List<OrderItemPriceDetailAdjustment> getOrderItemPriceDetailAdjustments()
          Returns a List of the adjustments that effected this priceDetail.
 int getQuantity()
          The quantity of this OrderItemPriceDetail.
 Money getTotalAdjustedPrice()
          Returns the total adjustedPrice.
 Money getTotalAdjustmentValue()
          Returns getAdjustmentValue() * the quantity.
 boolean getUseSalePrice()
          Indicates that the adjustments were based off of the item's sale price.
 void setId(Long id)
          Sets the unique id of the OrderItem.
 void setOrderItem(OrderItem orderItem)
          Sets the orderItem for this itemPriceDetail.
 void setOrderItemAdjustments(List<OrderItemPriceDetailAdjustment> orderItemPriceDetailAdjustments)
          Sets the list of OrderItemPriceDetailAdjustment
 void setQuantity(int quantity)
          Returns the quantity
 void setUseSalePrice(boolean useSalePrice)
          Set that the adjustments should be taken off of the item's sale price.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected Long id

orderItem

protected OrderItem orderItem

orderItemPriceDetailAdjustments

protected List<OrderItemPriceDetailAdjustment> orderItemPriceDetailAdjustments

quantity

protected int quantity

useSalePrice

protected Boolean useSalePrice
Constructor Detail

OrderItemPriceDetailImpl

public OrderItemPriceDetailImpl()
Method Detail

getId

public Long getId()
Description copied from interface: OrderItemPriceDetail
The unique identifier of this OrderItem

Specified by:
getId in interface OrderItemPriceDetail
Returns:

setId

public void setId(Long id)
Description copied from interface: OrderItemPriceDetail
Sets the unique id of the OrderItem. Typically left blank for new items and Broadleaf will set using the next sequence number.

Specified by:
setId in interface OrderItemPriceDetail

getOrderItem

public OrderItem getOrderItem()
Description copied from interface: OrderItemPriceDetail
Reference back to the containing orderItem.

Specified by:
getOrderItem in interface OrderItemPriceDetail
Returns:

setOrderItem

public void setOrderItem(OrderItem orderItem)
Description copied from interface: OrderItemPriceDetail
Sets the orderItem for this itemPriceDetail.

Specified by:
setOrderItem in interface OrderItemPriceDetail

getOrderItemPriceDetailAdjustments

public List<OrderItemPriceDetailAdjustment> getOrderItemPriceDetailAdjustments()
Description copied from interface: OrderItemPriceDetail
Returns a List of the adjustments that effected this priceDetail.

Specified by:
getOrderItemPriceDetailAdjustments in interface OrderItemPriceDetail
Returns:
a List of OrderItemPriceDetailAdjustment

setOrderItemAdjustments

public void setOrderItemAdjustments(List<OrderItemPriceDetailAdjustment> orderItemPriceDetailAdjustments)
Description copied from interface: OrderItemPriceDetail
Sets the list of OrderItemPriceDetailAdjustment

Specified by:
setOrderItemAdjustments in interface OrderItemPriceDetail

getQuantity

public int getQuantity()
Description copied from interface: OrderItemPriceDetail
The quantity of this OrderItemPriceDetail.

Specified by:
getQuantity in interface OrderItemPriceDetail
Returns:

setQuantity

public void setQuantity(int quantity)
Description copied from interface: OrderItemPriceDetail
Returns the quantity

Specified by:
setQuantity in interface OrderItemPriceDetail

getCurrency

protected BroadleafCurrency getCurrency()

getAdjustmentValue

public Money getAdjustmentValue()
Description copied from interface: OrderItemPriceDetail
Returns the value of all adjustments for a single quantity of the item. Use OrderItemPriceDetail.getTotalAdjustmentValue() to get the total for all quantities of this item.

Specified by:
getAdjustmentValue in interface OrderItemPriceDetail
Returns:

getTotalAdjustmentValue

public Money getTotalAdjustmentValue()
Description copied from interface: OrderItemPriceDetail
Returns getAdjustmentValue() * the quantity.

Specified by:
getTotalAdjustmentValue in interface OrderItemPriceDetail
Returns:

getTotalAdjustedPrice

public Money getTotalAdjustedPrice()
Description copied from interface: OrderItemPriceDetail
Returns the total adjustedPrice.

Specified by:
getTotalAdjustedPrice in interface OrderItemPriceDetail
Returns:

getUseSalePrice

public boolean getUseSalePrice()
Description copied from interface: OrderItemPriceDetail
Indicates that the adjustments were based off of the item's sale price.

Specified by:
getUseSalePrice in interface OrderItemPriceDetail
Returns:

setUseSalePrice

public void setUseSalePrice(boolean useSalePrice)
Description copied from interface: OrderItemPriceDetail
Set that the adjustments should be taken off of the item's sale price.

Specified by:
setUseSalePrice in interface OrderItemPriceDetail

getCurrencyCode

public String getCurrencyCode()
Specified by:
getCurrencyCode in interface CurrencyCodeIdentifiable


Copyright © 2013. All Rights Reserved.