public interface TranslationDao
Translation
entity.Modifier and Type | Method and Description |
---|---|
Long |
countTranslationEntries(TranslatedEntity entityType,
ResultType stage)
Count the number of translations for the given params.
|
Translation |
create()
Creates an empty translation instance that is not persisted to the database
|
void |
delete(Translation translation)
Deletes the given translation
|
String |
getEntityId(TranslatedEntity entityType,
Object entity)
Get the id for the object.
|
Class<?> |
getEntityImpl(TranslatedEntity entity)
Returns the entity implementation class based on the TranslatedEntity
|
Map<String,Object> |
getIdPropertyMetadata(TranslatedEntity entity)
Returns a map that holds the following data for the given entity:
"name" --> idProperty (the name of the id property, always a String)
"type" --> idProperty's type (usually either Long or String)
|
List<Translation> |
readAllTranslationEntries(TranslatedEntity entityType,
ResultType stage)
Read all the available translations for the given params.
|
List<Translation> |
readAllTranslationEntries(TranslatedEntity entityType,
ResultType stage,
List<String> entityIds)
Read all the available translations for the given params.
|
List<StandardCacheItem> |
readConvertedTranslationEntries(TranslatedEntity entityType,
ResultType stage)
Read all translation entries (see
readAllTranslationEntries(org.broadleafcommerce.common.i18n.domain.TranslatedEntity, org.broadleafcommerce.common.extension.ResultType) ),
and convert those results into a list of StandardCacheItem instances. |
Translation |
readTranslation(TranslatedEntity entity,
String entityId,
String fieldName,
String localeCode)
Reads a translation for the requested parameters.
|
Translation |
readTranslation(TranslatedEntity entityType,
String entityId,
String fieldName,
String localeCode,
String localeCountryCode,
ResultType stage)
Read a specific translation for the given params.
|
Translation |
readTranslationById(Long translationId)
Reads a translation by its own primary key
|
List<Translation> |
readTranslations(TranslatedEntity entity,
String entityId,
String fieldName)
Reads all translations for a given field
|
Translation |
save(Translation translation)
Persists the given translation
|
Translation save(Translation translation)
translation
- Translation create()
void delete(Translation translation)
translation
- Map<String,Object> getIdPropertyMetadata(TranslatedEntity entity)
entity
- Class<?> getEntityImpl(TranslatedEntity entity)
entity
- Translation readTranslationById(Long translationId)
translationId
- List<Translation> readTranslations(TranslatedEntity entity, String entityId, String fieldName)
entity
- entityId
- fieldName
- Translation readTranslation(TranslatedEntity entity, String entityId, String fieldName, String localeCode)
entity
- entityId
- fieldName
- localeCode
- String getEntityId(TranslatedEntity entityType, Object entity)
entityType
- entity
- Long countTranslationEntries(TranslatedEntity entityType, ResultType stage)
entityType
- stage
- param drives whether to look for entries at a template level or standard site level (multitenant concepts). Can be IGNORE. Any multitenant behavior is ignored in the absence of the multitenant module.List<Translation> readAllTranslationEntries(TranslatedEntity entityType, ResultType stage)
entityType
- stage
- param drives whether to look for entries at a template level or standard site level (multitenant concepts). Can be IGNORE. Any multitenant behavior is ignored in the absence of the multitenant module.List<Translation> readAllTranslationEntries(TranslatedEntity entityType, ResultType stage, List<String> entityIds)
entityType
- stage
- param drives whether to look for entries at a template level or standard site level (multitenant concepts). Can be IGNORE. Any multitenant behavior is ignored in the absence of the multitenant module.entityIds
- the Translation.getEntityId()
to restrict the results byList<StandardCacheItem> readConvertedTranslationEntries(TranslatedEntity entityType, ResultType stage)
readAllTranslationEntries(org.broadleafcommerce.common.i18n.domain.TranslatedEntity, org.broadleafcommerce.common.extension.ResultType)
),
and convert those results into a list of StandardCacheItem
instances.entityType
- stage
- param drives whether to look for entries at a template level or standard site level (multitenant concepts). Can be IGNORE. Any multitenant behavior is ignored in the absence of the multitenant module.Translation readTranslation(TranslatedEntity entityType, String entityId, String fieldName, String localeCode, String localeCountryCode, ResultType stage)
entityType
- entityId
- fieldName
- localeCode
- localeCountryCode
- stage
- param drives whether to look for entries at a template level or standard site level (multitenant concepts). Can be IGNORE. Any multitenant behavior is ignored in the absence of the multitenant module.Copyright © 2022. All rights reserved.