Class TranslationImpl

java.lang.Object
org.broadleafcommerce.common.i18n.domain.TranslationImpl
All Implemented Interfaces:
Serializable, MultiTenantCloneable<Translation>, Translation

@Entity public class TranslationImpl extends Object implements Serializable, Translation
See Also:
  • Field Details

    • id

      protected Long id
    • entityType

      protected String entityType
    • entityId

      protected String entityId
    • fieldName

      protected String fieldName
    • localeCode

      protected String localeCode
    • translatedValue

      protected String translatedValue
  • Constructor Details

    • TranslationImpl

      public TranslationImpl()
  • Method Details

    • getEntityType

      public TranslatedEntity getEntityType()
      Specified by:
      getEntityType in interface Translation
    • setEntityType

      public void setEntityType(TranslatedEntity entityType)
      Specified by:
      setEntityType in interface Translation
    • getId

      public Long getId()
      Specified by:
      getId in interface Translation
    • setId

      public void setId(Long id)
      Specified by:
      setId in interface Translation
    • getEntityId

      public String getEntityId()
      Specified by:
      getEntityId in interface Translation
    • setEntityId

      public void setEntityId(String entityId)
      Specified by:
      setEntityId in interface Translation
    • getFieldName

      public String getFieldName()
      Specified by:
      getFieldName in interface Translation
    • setFieldName

      public void setFieldName(String fieldName)
      Specified by:
      setFieldName in interface Translation
    • getLocaleCode

      public String getLocaleCode()
      Specified by:
      getLocaleCode in interface Translation
    • setLocaleCode

      public void setLocaleCode(String localeCode)
      Specified by:
      setLocaleCode in interface Translation
    • getTranslatedValue

      public String getTranslatedValue()
      Specified by:
      getTranslatedValue in interface Translation
    • setTranslatedValue

      public void setTranslatedValue(String translatedValue)
      Specified by:
      setTranslatedValue in interface Translation
    • createOrRetrieveCopyInstance

      public <G extends Translation> 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();

      //copy extended field values on myClone here

      return createResponse; }

      Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:

      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 interface MultiTenantCloneable<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