Interface CustomizedCategoryProductRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- Type Parameters:
D
- Type ofTrackable
entity. Should be the persistent counterpart to aCategoryProduct
.
- All Known Subinterfaces:
CategoryProductRepository<D>
,JpaCategoryProductRepository<D>
- All Known Implementing Classes:
JpaCustomizedCategoryProductRepository
public interface CustomizedCategoryProductRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to
CategoryProduct
maintenance and filtering.- Author:
- Nathan Moore (nathandmoore)
-
Method Summary
Modifier and TypeMethodDescriptionlong
countNonProductionRecordsByProductIdsInTenant
(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.org.springframework.data.domain.Page<D>
findAllByCategoryIdAndIsSorted
(String categoryContextId, boolean isSorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) org.springframework.data.domain.Page<D>
findAllByCategoryIdAndProductIds
(String categoryContextId, List<String> productIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) org.springframework.data.domain.Page<D>
findAllByCategoryIdAndProductIdsAndIsSorted
(String categoryContextId, List<String> productIds, boolean isSorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns allCategoryProducts
for the givenCategory.id
andProduct's ID
whereSortable.getSorted()
is true.findAllByProductContextIdIn
(Collection<String> productContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the category products which are associated with any of the givenproductContextIds
.
-
Method Details
-
findAllByCategoryIdAndIsSorted
@NonNull @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByCategoryIdAndIsSorted(@NonNull String categoryContextId, boolean isSorted, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Parameters:
categoryContextId
- aCategory's ID
for which to find all sortedCategoryProducts
.isSorted
- Whether to returnCategoryProducts
whereCategoryProduct.sorted
is true else where false.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
- context surrounding sandboxing and multitenant state- Returns:
- all
CategoryProducts
for the givenCategory.id
whereSortable.getSorted()
is true.
-
findAllByCategoryIdAndProductIdsAndIsSorted
@NonNull @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByCategoryIdAndProductIdsAndIsSorted(@NonNull String categoryContextId, @Nullable List<String> productIds, boolean isSorted, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns allCategoryProducts
for the givenCategory.id
andProduct's ID
whereSortable.getSorted()
is true.- Parameters:
categoryContextId
- aCategory's ID
for which to find all sortedCategoryProducts
.productIds
- the list ofProduct's ID
to retrieveisSorted
- Whether to returnCategoryProducts
whereCategoryProduct.sorted
is true else where false.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
- context surrounding sandboxing and multitenant state- Returns:
- all
CategoryProducts
for the givenCategory.id
whereSortable.getSorted()
is true.
-
findAllByCategoryIdAndProductIds
@NonNull @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByCategoryIdAndProductIds(@NonNull String categoryContextId, @Nullable List<String> productIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Parameters:
categoryContextId
- aCategory's ID
for which to find all sortedCategoryProducts
.productIds
- the list ofProduct's ID
to retrievefilters
- 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
- context surrounding sandboxing and multitenant state- Returns:
- all
CategoryProducts
for the givenCategory.id
whereSortable.getSorted()
is true.
-
findAllByProductContextIdIn
@Policy(operationTypes=READ) Stream<D> findAllByProductContextIdIn(Collection<String> productContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the category products which are associated with any of the givenproductContextIds
.- Parameters:
productContextIds
- a collection of product context IDs which the results must be associated withcontextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- all of the category products which are associated with any of the given
productContextIds
-
countNonProductionRecordsByProductIdsInTenant
@Policy(operationTypes=READ) long countNonProductionRecordsByProductIdsInTenant(@NonNull Iterable<String> productContextIds, @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:
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
-