@Entity public class OfferOfferRuleXrefImpl extends Object implements OfferOfferRuleXref, SimpleRule
| Modifier and Type | Field and Description |
|---|---|
protected Long |
id |
protected String |
key |
protected Offer |
offer |
protected OfferRule |
offerRule |
| Constructor and Description |
|---|
OfferOfferRuleXrefImpl() |
OfferOfferRuleXrefImpl(Offer offer,
OfferRule offerRule,
String key) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createEntityInstance() |
<G extends OfferOfferRuleXref> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
Long |
getId() |
String |
getKey() |
String |
getMatchRule()
The rule in the form of an MVEL expression
|
Offer |
getOffer() |
OfferRule |
getOfferRule() |
void |
setId(Long id) |
void |
setKey(String key) |
void |
setMatchRule(String matchRule)
Sets the match rule used to test this item.
|
void |
setOffer(Offer offer) |
void |
setOfferRule(OfferRule offerRule) |
protected Long id
protected Offer offer
protected OfferRule offerRule
protected String key
public Long getId()
getId in interface OfferOfferRuleXrefpublic void setId(Long id)
setId in interface OfferOfferRuleXrefpublic Offer getOffer()
getOffer in interface OfferOfferRuleXrefpublic void setOffer(Offer offer)
setOffer in interface OfferOfferRuleXrefpublic OfferRule getOfferRule()
getOfferRule in interface OfferOfferRuleXrefpublic void setOfferRule(OfferRule offerRule)
setOfferRule in interface OfferOfferRuleXrefpublic String getKey()
getKey in interface OfferOfferRuleXrefpublic void setKey(String key)
setKey in interface OfferOfferRuleXrefpublic String getMatchRule()
SimpleRulegetMatchRule in interface SimpleRulepublic void setMatchRule(@Nonnull String matchRule)
SimpleRulesetMatchRule in interface SimpleRulematchRule - the rule as an MVEL stringprotected void createEntityInstance()
public <G extends OfferOfferRuleXref> 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<OfferOfferRuleXref>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2019. All rights reserved.