Interface PromotionalProductService<P extends PromotionalProduct>
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
- All Known Implementing Classes:
DefaultPromotionalProductService
public interface PromotionalProductService<P extends PromotionalProduct>
extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Service API for
PromotionalProducts
. Supported by
PromotionalProductRepository
.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionlong
countNonProductionRecordsByProductIdsInTenant
(Collection<String> productIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns the count of non-production records that match the givenproductContextIds
and the given tenant context.org.springframework.data.domain.Page<P>
readAllByProductId
(String productId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of thePromotionalProducts
associated with the givenproduct ID
.readAllByProductIds
(Collection<String> productIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of thePromotionalProducts
associated with the givenproduct IDs
.Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Method Details
-
readAllByProductId
org.springframework.data.domain.Page<P> readAllByProductId(String productId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of thePromotionalProducts
associated with the givenproduct ID
.- Parameters:
productId
- TheProduct ID
for which to find associatedPromotionalProducts
filters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- the context to query within- Returns:
- Reads all of the
PromotionalProducts
associated with the givenproduct ID
.
-
readAllByProductIds
List<P> readAllByProductIds(Collection<String> productIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of thePromotionalProducts
associated with the givenproduct IDs
.- Parameters:
productIds
- TheProduct IDs
for which to find associatedPromotionalProducts
contextInfo
- the context to query within- Returns:
- Reads all of the
PromotionalProducts
associated with the givenproduct IDs
.
-
countNonProductionRecordsByProductIdsInTenant
long countNonProductionRecordsByProductIdsInTenant(@NonNull Collection<String> productIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns the count of non-production records that match the givenproductContextIds
and the given tenant context.- Parameters:
productIds
- 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
-
getRepositoryDomain
-