@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 DataDrivenEnumeration
public void setId(Long id)
setId
in interface DataDrivenEnumeration
public String getKey()
getKey
in interface DataDrivenEnumeration
public void setKey(String key)
setKey
in interface DataDrivenEnumeration
public Boolean getModifiable()
getModifiable
in interface DataDrivenEnumeration
public void setModifiable(Boolean modifiable)
setModifiable
in interface DataDrivenEnumeration
public List<DataDrivenEnumerationValue> getEnumValues()
DataDrivenEnumeration
getEnumValues
in interface DataDrivenEnumeration
public void setEnumValues(List<DataDrivenEnumerationValue> enumValues)
DataDrivenEnumeration
setEnumValues
in interface DataDrivenEnumeration
@Deprecated public List<DataDrivenEnumerationValue> getOrderItems()
DataDrivenEnumeration
getOrderItems
in interface DataDrivenEnumeration
@Deprecated public void setOrderItems(List<DataDrivenEnumerationValue> orderItems)
DataDrivenEnumeration
setOrderItems
in interface DataDrivenEnumeration
public <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 © 2022. All rights reserved.