@Entity public class OrderItemPriceDetailAdjustmentImpl extends Object implements OrderItemPriceDetailAdjustment, CurrencyCodeIdentifiable
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
OrderItemPriceDetailAdjustmentImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends OrderItemPriceDetailAdjustment> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
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) |
public static final long serialVersionUID
protected Long id
protected OrderItemPriceDetail orderItemPriceDetail
protected Offer offer
protected String offerName
protected String reason
protected BigDecimal value
protected boolean appliedToSalePrice
protected Money retailValue
protected Money salesValue
public void init(OrderItemPriceDetail orderItemPriceDetail, Offer offer, String reason)
init in interface OrderItemPriceDetailAdjustmentpublic Long getId()
getId in interface Adjustmentpublic void setId(Long id)
setId in interface Adjustmentpublic OrderItemPriceDetail getOrderItemPriceDetail()
getOrderItemPriceDetail in interface OrderItemPriceDetailAdjustmentpublic Offer getOffer()
getOffer in interface Adjustmentpublic String getOfferName()
OrderItemPriceDetailAdjustmentgetOfferName in interface OrderItemPriceDetailAdjustmentpublic String getReason()
getReason in interface Adjustmentpublic void setReason(String reason)
setReason in interface Adjustmentpublic void setOrderItemPriceDetail(OrderItemPriceDetail orderItemPriceDetail)
setOrderItemPriceDetail in interface OrderItemPriceDetailAdjustmentpublic void setOffer(Offer offer)
public void setOfferName(String offerName)
OrderItemPriceDetailAdjustmentsetOfferName in interface OrderItemPriceDetailAdjustmentprotected BroadleafCurrency getCurrency()
public Money getValue()
getValue in interface Adjustmentpublic void setValue(Money value)
setValue in interface Adjustmentpublic boolean isAppliedToSalePrice()
OrderItemPriceDetailAdjustmentisAppliedToSalePrice in interface OrderItemPriceDetailAdjustmentpublic void setAppliedToSalePrice(boolean appliedToSalePrice)
setAppliedToSalePrice in interface OrderItemPriceDetailAdjustmentpublic Money getRetailPriceValue()
OrderItemPriceDetailAdjustmentgetRetailPriceValue in interface OrderItemPriceDetailAdjustmentpublic void setRetailPriceValue(Money retailPriceValue)
setRetailPriceValue in interface OrderItemPriceDetailAdjustmentpublic Money getSalesPriceValue()
OrderItemPriceDetailAdjustmentgetSalesPriceValue in interface OrderItemPriceDetailAdjustmentpublic void setSalesPriceValue(Money salesPriceValue)
setSalesPriceValue in interface OrderItemPriceDetailAdjustmentpublic String getCurrencyCode()
getCurrencyCode in interface CurrencyCodeIdentifiablepublic <G extends OrderItemPriceDetailAdjustment> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
MultiTenantCloneable
public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {
CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context);
if (createResponse.isAlreadyPopulated()) {
return createResponse;
}
MyClass myClone = createResponse.getClone();
//copy extended field values on myClone here
return createResponse;
}
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:
public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {
CreateResponse createResponse = context.createOrRetrieveCopyInstance(this);
MyClass myClone = createResponse.getClone();
//copy extended field values on myClone here
return createResponse;
}
createOrRetrieveCopyInstance in interface MultiTenantCloneable<OrderItemPriceDetailAdjustment>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2015. All rights reserved.