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 Longprotected Stringprotected 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.voidsetEnumValues(List<DataDrivenEnumerationValue> enumValues) Sets list of values associated with this enumeration.voidvoidvoidsetModifiable(Boolean modifiable) voidsetOrderItems(List<DataDrivenEnumerationValue> orderItems) Deprecated.
-
Field Details
-
id
-
key
-
modifiable
-
enumValues
-
-
Constructor Details
-
DataDrivenEnumerationImpl
public DataDrivenEnumerationImpl()
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceDataDrivenEnumeration
-
setId
- Specified by:
setIdin interfaceDataDrivenEnumeration
-
getKey
- Specified by:
getKeyin interfaceDataDrivenEnumeration
-
setKey
- Specified by:
setKeyin interfaceDataDrivenEnumeration
-
getModifiable
- Specified by:
getModifiablein interfaceDataDrivenEnumeration
-
setModifiable
- Specified by:
setModifiablein interfaceDataDrivenEnumeration
-
getEnumValues
Description copied from interface:DataDrivenEnumerationGets list of values associated with this enumeration with the hidden flag set to false or null.- Specified by:
getEnumValuesin interfaceDataDrivenEnumeration
-
setEnumValues
Description copied from interface:DataDrivenEnumerationSets list of values associated with this enumeration.- Specified by:
setEnumValuesin interfaceDataDrivenEnumeration
-
getOrderItems
Deprecated.Description copied from interface:DataDrivenEnumerationIncorrectly named, kept purely for API consistency- Specified by:
getOrderItemsin interfaceDataDrivenEnumeration
-
setOrderItems
Deprecated.Description copied from interface:DataDrivenEnumerationIncorrectly named, kept purely for API consistency- Specified by:
setOrderItemsin interfaceDataDrivenEnumeration
-
createOrRetrieveCopyInstance
public <G extends DataDrivenEnumeration> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException Description copied from interface:MultiTenantCloneableClone 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 { CreateResponsecreateResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here
return createResponse; }
- Specified by:
createOrRetrieveCopyInstancein 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
-