Class DataDrivenEnumerationValueImpl
java.lang.Object
org.broadleafcommerce.common.enumeration.domain.DataDrivenEnumerationValueImpl
- All Implemented Interfaces:
Serializable
,MultiTenantCloneable<DataDrivenEnumerationValue>
,DataDrivenEnumerationValue
@Entity
public class DataDrivenEnumerationValueImpl
extends Object
implements DataDrivenEnumerationValue
- Author:
- Jeff Fischer
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends DataDrivenEnumerationValue>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.getId()
getKey()
getType()
void
setDisplay
(String display) void
void
void
void
setType
(DataDrivenEnumeration type)
-
Field Details
-
id
-
type
-
key
-
display
-
-
Constructor Details
-
DataDrivenEnumerationValueImpl
public DataDrivenEnumerationValueImpl()
-
-
Method Details
-
getDisplay
- Specified by:
getDisplay
in interfaceDataDrivenEnumerationValue
-
setDisplay
- Specified by:
setDisplay
in interfaceDataDrivenEnumerationValue
-
getHidden
- Specified by:
getHidden
in interfaceDataDrivenEnumerationValue
-
setHidden
- Specified by:
setHidden
in interfaceDataDrivenEnumerationValue
-
getId
- Specified by:
getId
in interfaceDataDrivenEnumerationValue
-
setId
- Specified by:
setId
in interfaceDataDrivenEnumerationValue
-
getKey
- Specified by:
getKey
in interfaceDataDrivenEnumerationValue
-
setKey
- Specified by:
setKey
in interfaceDataDrivenEnumerationValue
-
getType
- Specified by:
getType
in interfaceDataDrivenEnumerationValue
-
setType
- Specified by:
setType
in interfaceDataDrivenEnumerationValue
-
createOrRetrieveCopyInstance
public <G extends DataDrivenEnumerationValue> 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<DataDrivenEnumerationValue>
- 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
-