@Entity public class DataDrivenEnumerationImpl extends Object implements DataDrivenEnumeration
| Modifier and Type | Field and Description |
|---|---|
protected List<DataDrivenEnumerationValue> |
enumValues |
protected Long |
id |
protected String |
key |
protected Boolean |
modifiable |
| Constructor and Description |
|---|
DataDrivenEnumerationImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends DataDrivenEnumeration> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
List<DataDrivenEnumerationValue> |
getEnumValues()
Gets list of values associated with this enumeration.
|
Long |
getId() |
String |
getKey() |
Boolean |
getModifiable() |
List<DataDrivenEnumerationValue> |
getOrderItems()
Deprecated.
|
void |
setEnumValues(List<DataDrivenEnumerationValue> enumValues)
Sets list of values associated with this enumeration.
|
void |
setId(Long id) |
void |
setKey(String key) |
void |
setModifiable(Boolean modifiable) |
void |
setOrderItems(List<DataDrivenEnumerationValue> orderItems)
Deprecated.
|
protected Long id
protected String key
protected Boolean modifiable
protected List<DataDrivenEnumerationValue> enumValues
public Long getId()
getId in interface DataDrivenEnumerationpublic void setId(Long id)
setId in interface DataDrivenEnumerationpublic String getKey()
getKey in interface DataDrivenEnumerationpublic void setKey(String key)
setKey in interface DataDrivenEnumerationpublic Boolean getModifiable()
getModifiable in interface DataDrivenEnumerationpublic void setModifiable(Boolean modifiable)
setModifiable in interface DataDrivenEnumerationpublic List<DataDrivenEnumerationValue> getEnumValues()
DataDrivenEnumerationgetEnumValues in interface DataDrivenEnumerationpublic void setEnumValues(List<DataDrivenEnumerationValue> enumValues)
DataDrivenEnumerationsetEnumValues in interface DataDrivenEnumeration@Deprecated public List<DataDrivenEnumerationValue> getOrderItems()
DataDrivenEnumerationgetOrderItems in interface DataDrivenEnumeration@Deprecated public void setOrderItems(List<DataDrivenEnumerationValue> orderItems)
DataDrivenEnumerationsetOrderItems in interface DataDrivenEnumerationpublic <G extends DataDrivenEnumeration> 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<DataDrivenEnumeration>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.