Class DataDrivenEnumerationImpl
java.lang.Object
org.broadleafcommerce.common.enumeration.domain.DataDrivenEnumerationImpl
- All Implemented Interfaces:
Serializable
,MultiTenantCloneable<DataDrivenEnumeration>
,DataDrivenEnumeration
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<DataDrivenEnumerationValue>
protected Long
protected String
protected Boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends DataDrivenEnumeration>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.Gets list of values associated with this enumeration with the hidden flag set to false or null.getId()
getKey()
Deprecated.void
setEnumValues
(List<DataDrivenEnumerationValue> enumValues) Sets list of values associated with this enumeration.void
void
void
setModifiable
(Boolean modifiable) void
setOrderItems
(List<DataDrivenEnumerationValue> orderItems) Deprecated.
-
Field Details
-
id
-
key
-
modifiable
-
enumValues
-
-
Constructor Details
-
DataDrivenEnumerationImpl
public DataDrivenEnumerationImpl()
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceDataDrivenEnumeration
-
setId
- Specified by:
setId
in interfaceDataDrivenEnumeration
-
getKey
- Specified by:
getKey
in interfaceDataDrivenEnumeration
-
setKey
- Specified by:
setKey
in interfaceDataDrivenEnumeration
-
getModifiable
- Specified by:
getModifiable
in interfaceDataDrivenEnumeration
-
setModifiable
- Specified by:
setModifiable
in interfaceDataDrivenEnumeration
-
getEnumValues
Description copied from interface:DataDrivenEnumeration
Gets list of values associated with this enumeration with the hidden flag set to false or null.- Specified by:
getEnumValues
in interfaceDataDrivenEnumeration
-
setEnumValues
Description copied from interface:DataDrivenEnumeration
Sets list of values associated with this enumeration.- Specified by:
setEnumValues
in interfaceDataDrivenEnumeration
-
getOrderItems
Deprecated.Description copied from interface:DataDrivenEnumeration
Incorrectly named, kept purely for API consistency- Specified by:
getOrderItems
in interfaceDataDrivenEnumeration
-
setOrderItems
Deprecated.Description copied from interface:DataDrivenEnumeration
Incorrectly named, kept purely for API consistency- Specified by:
setOrderItems
in interfaceDataDrivenEnumeration
-
createOrRetrieveCopyInstance
public <G extends DataDrivenEnumeration> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException Description copied from interface:MultiTenantCloneable
Clone this entity for the purpose of multiple tenancy. Note, extending classes should follow this pattern:public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context); if (createResponse.isAlreadyPopulated()) { return createResponse; } MyClass myClone = createResponse.getClone();
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity://copy extended field values on myClone here
return createResponse; }
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; }
- Specified by:
createOrRetrieveCopyInstance
in interfaceMultiTenantCloneable<DataDrivenEnumeration>
- Parameters:
context
- a context object providing persistence and library functionality for copying entities- Returns:
- the resulting copy container, possibly already persisted
- Throws:
CloneNotSupportedException
- if there's a problem detected with the cloning configuration
-