@Entity public class FixedPriceFulfillmentOptionImpl extends FulfillmentOptionImpl implements FixedPriceFulfillmentOption
FulfillmentOptionImpl.Presentation| Modifier and Type | Field and Description |
|---|---|
protected BroadleafCurrency |
currency |
protected BigDecimal |
price |
fulfillmentType, id, longDescription, name, taxable, taxCode, useFlatRates| Constructor and Description |
|---|
FixedPriceFulfillmentOptionImpl() |
| Modifier and Type | Method and Description |
|---|---|
CreateResponse<FixedPriceFulfillmentOption> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
BroadleafCurrency |
getCurrency() |
Money |
getPrice() |
void |
setCurrency(BroadleafCurrency currency) |
void |
setPrice(Money price) |
equals, getFulfillmentType, getId, getLongDescription, getName, getTaxable, getTaxCode, getUseFlatRates, hashCode, setFulfillmentType, setId, setLongDescription, setName, setTaxable, setTaxCode, setUseFlatRatesclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetFulfillmentType, getId, getLongDescription, getName, getTaxable, getTaxCode, getUseFlatRates, setFulfillmentType, setId, setLongDescription, setName, setTaxable, setTaxCode, setUseFlatRatesprotected BigDecimal price
protected BroadleafCurrency currency
public Money getPrice()
getPrice in interface FixedPriceFulfillmentOptionpublic void setPrice(Money price)
setPrice in interface FixedPriceFulfillmentOptionpublic BroadleafCurrency getCurrency()
getCurrency in interface FixedPriceFulfillmentOptionpublic void setCurrency(BroadleafCurrency currency)
setCurrency in interface FixedPriceFulfillmentOptionpublic CreateResponse<FixedPriceFulfillmentOption> 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<FulfillmentOption>createOrRetrieveCopyInstance in class FulfillmentOptionImplcontext - 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.