org.broadleafcommerce.core.offer.domain
Class OrderItemPriceDetailAdjustmentImpl

java.lang.Object
  extended by org.broadleafcommerce.core.offer.domain.OrderItemPriceDetailAdjustmentImpl
All Implemented Interfaces:
Serializable, CurrencyCodeIdentifiable, Adjustment, OrderItemPriceDetailAdjustment

@Entity
public class OrderItemPriceDetailAdjustmentImpl
extends Object
implements OrderItemPriceDetailAdjustment, CurrencyCodeIdentifiable

See Also:
Serialized Form

Field Summary
protected  boolean appliedToSalePrice
           
protected  Long id
           
protected  Offer offer
           
protected  String offerName
           
protected  OrderItemPriceDetail orderItemPriceDetail
           
protected  String reason
           
protected  Money retailValue
           
protected  Money salesValue
           
static long serialVersionUID
           
protected  BigDecimal value
           
 
Constructor Summary
OrderItemPriceDetailAdjustmentImpl()
           
 
Method Summary
 boolean equals(Object obj)
           
protected  BroadleafCurrency getCurrency()
           
 String getCurrencyCode()
           
 Long getId()
           
 Offer getOffer()
           
 String getOfferName()
          Stores the offer name at the time the adjustment was made.
 OrderItemPriceDetail getOrderItemPriceDetail()
           
 String getReason()
           
 Money getRetailPriceValue()
          Value of this adjustment relative to the retail price.
 Money getSalesPriceValue()
          Value of this adjustment relative to the sale price.
 Money getValue()
           
 int hashCode()
           
 void init(OrderItemPriceDetail orderItemPriceDetail, Offer offer, String reason)
           
 boolean isAppliedToSalePrice()
          Even for items that are on sale, it is possible that an adjustment was made to the retail price that gave the customer a better offer.
 void setAppliedToSalePrice(boolean appliedToSalePrice)
           
 void setId(Long id)
           
 void setOffer(Offer offer)
           
 void setOfferName(String offerName)
          Returns the name of the offer at the time the adjustment was made.
 void setOrderItemPriceDetail(OrderItemPriceDetail orderItemPriceDetail)
           
 void setReason(String reason)
           
 void setRetailPriceValue(Money retailPriceValue)
           
 void setSalesPriceValue(Money salesPriceValue)
           
 void setValue(Money value)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

id

protected Long id

orderItemPriceDetail

protected OrderItemPriceDetail orderItemPriceDetail

offer

protected Offer offer

offerName

protected String offerName

reason

protected String reason

value

protected BigDecimal value

appliedToSalePrice

protected boolean appliedToSalePrice

retailValue

protected Money retailValue

salesValue

protected Money salesValue
Constructor Detail

OrderItemPriceDetailAdjustmentImpl

public OrderItemPriceDetailAdjustmentImpl()
Method Detail

init

public void init(OrderItemPriceDetail orderItemPriceDetail,
                 Offer offer,
                 String reason)
Specified by:
init in interface OrderItemPriceDetailAdjustment

getId

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

setId

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

getOrderItemPriceDetail

public OrderItemPriceDetail getOrderItemPriceDetail()
Specified by:
getOrderItemPriceDetail in interface OrderItemPriceDetailAdjustment

getOffer

public Offer getOffer()
Specified by:
getOffer in interface Adjustment

getOfferName

public String getOfferName()
Description copied from interface: OrderItemPriceDetailAdjustment
Stores the offer name at the time the adjustment was made. Primarily to simplify display within the admin.

Specified by:
getOfferName in interface OrderItemPriceDetailAdjustment
Returns:

getReason

public String getReason()
Specified by:
getReason in interface Adjustment

setReason

public void setReason(String reason)
Specified by:
setReason in interface Adjustment

setOrderItemPriceDetail

public void setOrderItemPriceDetail(OrderItemPriceDetail orderItemPriceDetail)
Specified by:
setOrderItemPriceDetail in interface OrderItemPriceDetailAdjustment

setOffer

public void setOffer(Offer offer)

setOfferName

public void setOfferName(String offerName)
Description copied from interface: OrderItemPriceDetailAdjustment
Returns the name of the offer at the time the adjustment was made.

Specified by:
setOfferName in interface OrderItemPriceDetailAdjustment

getCurrency

protected BroadleafCurrency getCurrency()

getValue

public Money getValue()
Specified by:
getValue in interface Adjustment

setValue

public void setValue(Money value)
Specified by:
setValue in interface Adjustment

isAppliedToSalePrice

public boolean isAppliedToSalePrice()
Description copied from interface: OrderItemPriceDetailAdjustment
Even for items that are on sale, it is possible that an adjustment was made to the retail price that gave the customer a better offer. Since some offers can be applied to the sale price and some only to the retail price, this setting provides the required value.

Specified by:
isAppliedToSalePrice in interface OrderItemPriceDetailAdjustment
Returns:
true if this adjustment was applied to the sale price

setAppliedToSalePrice

public void setAppliedToSalePrice(boolean appliedToSalePrice)
Specified by:
setAppliedToSalePrice in interface OrderItemPriceDetailAdjustment

getRetailPriceValue

public Money getRetailPriceValue()
Description copied from interface: OrderItemPriceDetailAdjustment
Value of this adjustment relative to the retail price.

Specified by:
getRetailPriceValue in interface OrderItemPriceDetailAdjustment
Returns:

setRetailPriceValue

public void setRetailPriceValue(Money retailPriceValue)
Specified by:
setRetailPriceValue in interface OrderItemPriceDetailAdjustment

getSalesPriceValue

public Money getSalesPriceValue()
Description copied from interface: OrderItemPriceDetailAdjustment
Value of this adjustment relative to the sale price.

Specified by:
getSalesPriceValue in interface OrderItemPriceDetailAdjustment
Returns:

setSalesPriceValue

public void setSalesPriceValue(Money salesPriceValue)
Specified by:
setSalesPriceValue in interface OrderItemPriceDetailAdjustment

getCurrencyCode

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2013. All Rights Reserved.