@Entity public class StructuredContentItemCriteriaImpl extends Object implements StructuredContentItemCriteria, ProfileEntity
| Modifier and Type | Field and Description |
|---|---|
protected Long |
id |
protected String |
orderItemMatchRule |
protected Integer |
quantity |
static long |
serialVersionUID |
protected StructuredContent |
structuredContent |
| Constructor and Description |
|---|
StructuredContentItemCriteriaImpl() |
| Modifier and Type | Method and Description |
|---|---|
StructuredContentItemCriteria |
cloneEntity()
Builds a copy of this item.
|
<G extends StructuredContentItemCriteria> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
boolean |
equals(Object obj) |
Long |
getId()
The primary key value for this rule object
|
String |
getMatchRule()
The rule in the form of an MVEL expression
|
Integer |
getQuantity()
The quantity for which a match must be found using the rule.
|
StructuredContent |
getStructuredContent()
Returns the parent
StructuredContent item to which this
field belongs. |
int |
hashCode() |
void |
setId(Long id)
The primary key value for this rule object
|
void |
setMatchRule(String matchRule)
Sets the match rule used to test this item.
|
void |
setQuantity(Integer receiveQuantity)
The quantity for which a match must be found using the rule.
|
void |
setStructuredContent(StructuredContent structuredContent)
Sets the parent
StructuredContent item. |
public static final long serialVersionUID
protected Long id
protected Integer quantity
protected String orderItemMatchRule
protected StructuredContent structuredContent
public Long getId()
QuantityBasedRulegetId in interface QuantityBasedRulepublic void setId(Long id)
QuantityBasedRulesetId in interface QuantityBasedRuleid - the primary key valuepublic Integer getQuantity()
QuantityBasedRulegetQuantity in interface QuantityBasedRulepublic void setQuantity(Integer receiveQuantity)
QuantityBasedRulesetQuantity in interface QuantityBasedRulereceiveQuantity - the quantity of matches requiredpublic String getMatchRule()
QuantityBasedRulegetMatchRule in interface QuantityBasedRulepublic void setMatchRule(String matchRule)
QuantityBasedRulesetMatchRule in interface QuantityBasedRulematchRule - the rule as an MVEL stringpublic StructuredContent getStructuredContent()
StructuredContentItemCriteriaStructuredContent item to which this
field belongs.getStructuredContent in interface StructuredContentItemCriteriapublic void setStructuredContent(StructuredContent structuredContent)
StructuredContentItemCriteriaStructuredContent item.setStructuredContent in interface StructuredContentItemCriteriapublic StructuredContentItemCriteria cloneEntity()
StructuredContentItemCriteriacloneEntity in interface StructuredContentItemCriteriapublic <G extends StructuredContentItemCriteria> 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<StructuredContentItemCriteria>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2017. All rights reserved.