Class Translation
 Defines an entity that holds the value for a translation of a String field on another
 entity in a particular Locale. This is used to override the default value of that field
 in a matching locale.
 
Translations are designed to be unique per locale, entityType, entityId and entityField within a particular tenant context.
- Author:
- Kelly Tisdell (ktisdell)
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanbooleancom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.The name of the field on the entity to which this translation applies.The ID of the entity to which this translation applies.The type of the entity to which this translation applies, e.g., PRODUCT, CATEGORY, OFFER.getId()The context ID of this TranslationTheLocalewherein this Translation is applicablegetValue()This field holds the actual translated value.inthashCode()voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetEntityField(String entityField) The name of the field on the entity to which this translation applies.voidsetEntityId(String entityId) The ID of the entity to which this translation applies.voidsetEntityType(String entityType) The type of the entity to which this translation applies, e.g., PRODUCT, CATEGORY, OFFER.voidThe context ID of this TranslationvoidTheLocalewherein this Translation is applicablevoidThis field holds the actual translated value.toString()
- 
Constructor Details- 
Translation
- 
Translationpublic Translation()
 
- 
- 
Method Details- 
getIdThe context ID of this Translation- Returns:
- The context ID of this Translation
 
- 
getLocaleTheLocalewherein this Translation is applicable- Returns:
- The Localewherein this Translation is applicable.
 
- 
getEntityTypeThe type of the entity to which this translation applies, e.g., PRODUCT, CATEGORY, OFFER.- Returns:
- The type of the entity to which this translation applies, e.g., PRODUCT, CATEGORY, OFFER.
 
- 
getEntityIdThe ID of the entity to which this translation applies.- Returns:
- The ID of the entity to which this translation applies.
 
- 
getEntityFieldThe name of the field on the entity to which this translation applies.- Returns:
- The name of the field on the entity to which this translation applies.
 
- 
getValueThis field holds the actual translated value. This is anObjectto allow flexibility for what can be translated (ex: aStringor aListofStrings). This should ideally match the type of the value held byentityField.Note, however, that for certain value types, there may be type mismatches with entityFieldonce Jackson deserializes thevaluereceived in a request. For example, if a JSON array is received as the value, Jackson will simply deserialize it to aList.- Returns:
- the actual translated value
 
- 
getContextStatepublic com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Returns:
- a subset of Trackinginformation to expose the context state for this object
 
- 
setIdThe context ID of this Translation- Parameters:
- id- The context ID of this Translation
 
- 
setLocaleTheLocalewherein this Translation is applicable- Parameters:
- locale- The- Localewherein this Translation is applicable.
 
- 
setEntityTypeThe type of the entity to which this translation applies, e.g., PRODUCT, CATEGORY, OFFER.- Parameters:
- entityType- The type of the entity to which this translation applies, e.g., PRODUCT, CATEGORY, OFFER.
 
- 
setEntityIdThe ID of the entity to which this translation applies.- Parameters:
- entityId- The ID of the entity to which this translation applies.
 
- 
setEntityFieldThe name of the field on the entity to which this translation applies.- Parameters:
- entityField- The name of the field on the entity to which this translation applies.
 
- 
setValueThis field holds the actual translated value. This is anObjectto allow flexibility for what can be translated (ex: aStringor aListofStrings). This should ideally match the type of the value held byentityField.Note, however, that for certain value types, there may be type mismatches with entityFieldonce Jackson deserializes thevaluereceived in a request. For example, if a JSON array is received as the value, Jackson will simply deserialize it to aList.- Parameters:
- value- the actual translated value
 
- 
setContextStatepublic void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Parameters:
- contextState- a subset of- Trackinginformation to expose the context state for this object
 
- 
equals
- 
canEqual
- 
hashCodepublic int hashCode()
- 
toString
 
-