Class TranslationImpl
java.lang.Object
org.broadleafcommerce.common.i18n.domain.TranslationImpl
- All Implemented Interfaces:
Serializable,MultiTenantCloneable<Translation>,Translation
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends Translation>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.getId()voidsetEntityId(String entityId) voidsetEntityType(TranslatedEntity entityType) voidsetFieldName(String fieldName) voidvoidsetLocaleCode(String localeCode) voidsetTranslatedValue(String translatedValue)
-
Field Details
-
id
-
entityType
-
entityId
-
fieldName
-
localeCode
-
translatedValue
-
-
Constructor Details
-
TranslationImpl
public TranslationImpl()
-
-
Method Details
-
getEntityType
- Specified by:
getEntityTypein interfaceTranslation
-
setEntityType
- Specified by:
setEntityTypein interfaceTranslation
-
getId
- Specified by:
getIdin interfaceTranslation
-
setId
- Specified by:
setIdin interfaceTranslation
-
getEntityId
- Specified by:
getEntityIdin interfaceTranslation
-
setEntityId
- Specified by:
setEntityIdin interfaceTranslation
-
getFieldName
- Specified by:
getFieldNamein interfaceTranslation
-
setFieldName
- Specified by:
setFieldNamein interfaceTranslation
-
getLocaleCode
- Specified by:
getLocaleCodein interfaceTranslation
-
setLocaleCode
- Specified by:
setLocaleCodein interfaceTranslation
-
getTranslatedValue
- Specified by:
getTranslatedValuein interfaceTranslation
-
setTranslatedValue
- Specified by:
setTranslatedValuein interfaceTranslation
-
createOrRetrieveCopyInstance
public <G extends Translation> 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<Translation>- 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
-