Class JpaCustomizedDataDrivenEnumRepository<D extends JpaDataDrivenEnum>
java.lang.Object
com.broadleafcommerce.catalog.provider.jpa.repository.enumeration.JpaCustomizedDataDrivenEnumRepository<D>
- All Implemented Interfaces:
CustomizedDataDrivenEnumRepository<D>
,org.springframework.beans.factory.InitializingBean
public class JpaCustomizedDataDrivenEnumRepository<D extends JpaDataDrivenEnum>
extends Object
implements CustomizedDataDrivenEnumRepository<D>, org.springframework.beans.factory.InitializingBean
- Author:
- Sunny Yu
-
Constructor Summary
ConstructorDescriptionJpaCustomizedDataDrivenEnumRepository
(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder filterRulesCriteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected jakarta.persistence.criteria.Predicate
buildContextIdInFilter
(Collection<String> contextIds, jakarta.persistence.criteria.Root<D> dataDrivenEnumEntity, jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder, Map<String, Object> parameterValues) findAllByContextIdIn
(Collection<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves all data driven enums whose context IDs match any of the given IDs.protected jakarta.persistence.EntityManager
protected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelper
void
setRepository
(DataDrivenEnumRepository<D> repository)
-
Constructor Details
-
JpaCustomizedDataDrivenEnumRepository
public JpaCustomizedDataDrivenEnumRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder filterRulesCriteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager)
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
setRepository
-
findAllByContextIdIn
public Stream<D> findAllByContextIdIn(Collection<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedDataDrivenEnumRepository
Retrieves all data driven enums whose context IDs match any of the given IDs.- Specified by:
findAllByContextIdIn
in interfaceCustomizedDataDrivenEnumRepository<D extends JpaDataDrivenEnum>
- Parameters:
contextIds
- the context IDs to query forcontextInfo
- context information around sandbox and multitenant state- Returns:
- all data driven enums whose context IDs match any of the given IDs
-
buildContextIdInFilter
-
getNarrowingHelper
protected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelper getNarrowingHelper() -
getEntityManager
protected jakarta.persistence.EntityManager getEntityManager()
-