Class JpaCustomizedPromotionalProductRepository<D extends JpaPromotionalProduct>
java.lang.Object
com.broadleafcommerce.catalog.provider.jpa.repository.product.relation.JpaCustomizedPromotionalProductRepository<D>
- All Implemented Interfaces:
CustomizedPromotionalProductRepository<D>
,org.springframework.beans.factory.InitializingBean
public class JpaCustomizedPromotionalProductRepository<D extends JpaPromotionalProduct>
extends Object
implements CustomizedPromotionalProductRepository<D>, org.springframework.beans.factory.InitializingBean
- Author:
- Sunny Yu
-
Constructor Summary
ConstructorDescriptionJpaCustomizedPromotionalProductRepository
(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, List<com.broadleafcommerce.data.tracking.core.service.RsqlQueryTransformer> rsqlQueryTransformers, cz.jirutka.rsql.parser.ast.RSQLVisitor<jakarta.persistence.criteria.Predicate, Class<?>> rsqlVisitor, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder catalogFilterRuleCriteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
long
countNonProductionRecordsByProductIdsInTenant
(@NonNull Iterable<String> productContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns the count of non-production records that match the givenproductContextIds
and the given tenant context.protected JpaCatalogQueryHelper
void
setCatalogQueryHelper
(JpaCatalogQueryHelper catalogQueryHelper) void
setRepository
(PromotionalProductRepository<D> repository)
-
Constructor Details
-
JpaCustomizedPromotionalProductRepository
public JpaCustomizedPromotionalProductRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, List<com.broadleafcommerce.data.tracking.core.service.RsqlQueryTransformer> rsqlQueryTransformers, cz.jirutka.rsql.parser.ast.RSQLVisitor<jakarta.persistence.criteria.Predicate, Class<?>> rsqlVisitor, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder catalogFilterRuleCriteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager)
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
countNonProductionRecordsByProductIdsInTenant
public long countNonProductionRecordsByProductIdsInTenant(@NonNull @NonNull Iterable<String> productContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:CustomizedPromotionalProductRepository
Returns the count of non-production records that match the givenproductContextIds
and the given tenant context.- Specified by:
countNonProductionRecordsByProductIdsInTenant
in interfaceCustomizedPromotionalProductRepository<D extends JpaPromotionalProduct>
- Parameters:
productContextIds
- IDs of parent Products to match againstcontext
- Request context information around sandbox and multitenant state- Returns:
- the count of non-production records that match the given
productContextIds
and the given tenant context
-
setRepository
-
getCatalogQueryHelper
-
setCatalogQueryHelper
-