Interface TranslationRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Superinterfaces:
com.broadleafcommerce.common.extension.DomainTypeAware
,com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
,org.springframework.data.repository.Repository<D,
,String> com.broadleafcommerce.data.tracking.core.TrackableRepository<D>
- All Known Subinterfaces:
JpaTranslationRepository<D>
@NoRepositoryBean
public interface TranslationRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>
TrackableRepository
for managing the persistent counterparts of the Translation domain
.- Author:
- Nathan Moore (nathandmoore)
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByEntityTypeAndEntityId
(String entityType, String entityId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for the given entity info.findAllByEntityTypeAndEntityIdAndLocale
(String entityType, String entityId, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for the given entity info.findAllByEntityTypeAndEntityIdIn
(String entityType, List<String> entityIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for the given entity info.findAllByEntityTypeAndEntityIdInAndLocaleIn
(String entityType, List<String> entityIds, List<Locale> locales, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for multiple entities.findByEntityTypeAndEntityIdAndEntityFieldAndLocale
(String entityType, String entityId, String entityField, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translation for the given entity field.org.springframework.data.domain.Page<D>
findByEntityTypeAndEntityIdAndLocale
(String entityType, String entityId, Locale locale, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for the given entity info.Methods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged
Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRepository
archive, existsByContextId, findAll, findAll, findAll, findAll, findAll, findAll, findAllByContextId, findByContextId, findByContextIdAndCatalog, findByNativeId, findDeployable, findMaxSortMember, findMinSortMember, findOriginal, findPromotable, findPromoteOrientedItems, findRebasable, findRejectable, findRevertable, findTarget, getDomainType, getEntityInformation, getTrackableBehaviorUtil, getTypesToRegisterInMappingContext, pruneChangeDetails, pruneRestingNotificationStates, purgeObsoleteSandboxData, save, saveAll, setTrackableBehaviorUtil
-
Method Details
-
findByEntityTypeAndEntityIdAndLocale
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findByEntityTypeAndEntityIdAndLocale(String entityType, String entityId, Locale locale, @Nullable org.springframework.data.domain.Pageable pageInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for the given entity info.- Parameters:
entityType
- The type of the entity such as PRODUCT, CATEGORY, or OFFER.entityId
- The context ID of the entity.locale
- The translation's locale.pageInfo
-Pagingation info
regarding the current page of data to retrieve.context
-context information
related to multitenancy. Often used to validate visibility and mutability of persistence operations for a catalog.- Returns:
- the translations for the given entity.
-
findAllByEntityTypeAndEntityIdAndLocale
@Policy(operationTypes=READ) List<D> findAllByEntityTypeAndEntityIdAndLocale(String entityType, String entityId, Locale locale, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for the given entity info.- Parameters:
entityType
- The type of the entity such as PRODUCT, CATEGORY, or OFFER.entityId
- The context ID of the entity.locale
- The translation's locale.context
-context information
related to multitenancy. Often used to validate visibility and mutability of persistence operations for a catalog.- Returns:
- the translations for the given entity.
-
findByEntityTypeAndEntityIdAndEntityFieldAndLocale
@Policy(operationTypes=READ) Optional<D> findByEntityTypeAndEntityIdAndEntityFieldAndLocale(String entityType, String entityId, String entityField, Locale locale, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translation for the given entity field.- Parameters:
entityType
- The type of the entity such as PRODUCT, CATEGORY, or OFFER.entityId
- The context ID of the entity.entityField
- The name of the field on the entity to which the translation applies.locale
- The translation's locale.context
-context information
related to multitenancy. Often used to validate visibility and mutability of persistence operations for a catalog.- Returns:
- the translation for the given entity field.
-
findAllByEntityTypeAndEntityId
@Policy(operationTypes=READ) List<D> findAllByEntityTypeAndEntityId(String entityType, String entityId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for the given entity info.- Parameters:
entityType
- The type of the entity such as PRODUCT, CATEGORY, or OFFER.entityId
- The context ID of the entity.]context
-context information
related to multitenancy. Often used to validate visibility and mutability of persistence operations for a catalog.- Returns:
- the translations for the given entity.
-
findAllByEntityTypeAndEntityIdIn
@Policy(operationTypes=READ) List<D> findAllByEntityTypeAndEntityIdIn(String entityType, List<String> entityIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for the given entity info.- Parameters:
entityType
- The type of the entity such as PRODUCT, CATEGORY, or OFFER.entityIds
- The context IDs of the entitiescontext
-context information
related to multitenancy. Often used to validate visibility and mutability of persistence operations for a catalog.- Returns:
- the translations for the given entities
-
findAllByEntityTypeAndEntityIdInAndLocaleIn
@Policy(operationTypes=READ) List<D> findAllByEntityTypeAndEntityIdInAndLocaleIn(String entityType, List<String> entityIds, List<Locale> locales, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds the translations for multiple entities.- Parameters:
entityType
- The type of the entity such as PRODUCT, CATEGORY, or OFFER.entityIds
- The context IDs of multiple entities to check.locales
- The translation's locale(s).context
-context information
related to multitenancy. Often used to validate visibility and mutability of persistence operations for a catalog.- Returns:
- the translations for the requested entities.
-