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()voidsetDisplay(String display) voidvoidvoidvoidsetType(DataDrivenEnumeration type)
-
Field Details
-
id
-
type
-
key
-
display
-
-
Constructor Details
-
DataDrivenEnumerationValueImpl
public DataDrivenEnumerationValueImpl()
-
-
Method Details
-
getDisplay
- Specified by:
getDisplayin interfaceDataDrivenEnumerationValue
-
setDisplay
- Specified by:
setDisplayin interfaceDataDrivenEnumerationValue
-
getHidden
- Specified by:
getHiddenin interfaceDataDrivenEnumerationValue
-
setHidden
- Specified by:
setHiddenin interfaceDataDrivenEnumerationValue
-
getId
- Specified by:
getIdin interfaceDataDrivenEnumerationValue
-
setId
- Specified by:
setIdin interfaceDataDrivenEnumerationValue
-
getKey
- Specified by:
getKeyin interfaceDataDrivenEnumerationValue
-
setKey
- Specified by:
setKeyin interfaceDataDrivenEnumerationValue
-
getType
- Specified by:
getTypein interfaceDataDrivenEnumerationValue
-
setType
- Specified by:
setTypein interfaceDataDrivenEnumerationValue
-
createOrRetrieveCopyInstance
public <G extends DataDrivenEnumerationValue> 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<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
-