Interface CustomizedProductRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Known Subinterfaces:
JpaProductRepository<D>,ProductRepository<D>
- All Known Implementing Classes:
JpaCustomizedProductRepository
public interface CustomizedProductRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to
Product.-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<D>findAllByCategoryContextId(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) Finds all products in a given category.findAllByContextIdIn(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the products with matchingcontextIds.findAllByContextIdNotIn(Collection<String> exclusions, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the products matching the givenfilters, excluding any products whose IDs match a value inexclusions.findAllByUriIn(Iterable<String> uris, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the products with matchinguris.findAllDistinctContextId(int page, cz.jirutka.rsql.parser.ast.Node filters) Retrieves a list of unique product context IDs no larger thanpage.findAllDistinctContextIdPerContext(int page, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Retrieves a narrowed list of unique product context IDs narrowed on aContextInfoand no larger thanpage.findAllDistinctContextIdPerContextWithOptionalStipulations(cz.jirutka.rsql.parser.ast.Node filters, ProductStipulations stipulations, int pageSize, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Retrieves a list of unique product context IDs narrowed on aContextInfoand no larger thanpage.
-
Method Details
-
findAllDistinctContextId
Retrieves a list of unique product context IDs no larger thanpage. It is expected that any appropriate offset is achieved through criteria designated infilters.- Parameters:
page- the requested amount of results from the database. -1 indicates no limit.filters- additional filters to apply in the query. Should beEmptyNodeif no additional filters should be applied.- Returns:
- unique product IDs
-
findAllDistinctContextIdPerContext
List<String> findAllDistinctContextIdPerContext(int page, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Retrieves a narrowed list of unique product context IDs narrowed on aContextInfoand no larger thanpage. It is expected that any appropriate offset is achieved through criteria designated infilters.- Parameters:
page- the requested amount of results from the database. -1 indicates no limit.filters- additional filters to apply in the query. Should beEmptyNodeif no additional filters should be applied.context- The context used to help narrowing. For example, narrowing results to a particular catalog.- Returns:
- The narrowed list of unique product context IDs
-
findAllDistinctContextIdPerContextWithOptionalStipulations
List<String> findAllDistinctContextIdPerContextWithOptionalStipulations(@NonNull cz.jirutka.rsql.parser.ast.Node filters, @Nullable ProductStipulations stipulations, int pageSize, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Retrieves a list of unique product context IDs narrowed on aContextInfoand no larger thanpage. It is expected that any appropriate offset is achieved through criteria designated infilters.- Parameters:
filters- additional filters to apply in the query. Should beEmptyNodeif no additional filters should be applied.stipulations- Additional filtering context to be applied during product fetch. Stipulations are applied as a set of OR conditions, and any match of any of the stipulations designates a match for this set of conditions. Optional.pageSize- the requested amount of results from the database. -1 indicates no limit.context- The context used to help narrowing. For example, narrowing results to a particular catalog.- Returns:
- The narrowed list of unique product context IDs
-
findAllByContextIdNotIn
@Policy(operationTypes=READ) Stream<D> findAllByContextIdNotIn(@NonNull Collection<String> exclusions, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the products matching the givenfilters, excluding any products whose IDs match a value inexclusions.- Parameters:
exclusions- a list of context IDs of products which should be excluded from the resultsfilters- additional filters to apply in the query. Should beEmptyNodeif no additional filters should be applied.contextInfo- context information around sandboxing and multitenant state- Returns:
- all of the products matching the given
filters, excluding any products whose IDs match a value inexclusions
-
findAllByContextIdIn
@Policy(operationTypes=READ) List<D> findAllByContextIdIn(@NonNull Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the products with matchingcontextIds.- Parameters:
contextIds- The contextIds to matchcontextInfo- Request context information around sandbox and multitenant state- Returns:
- All of the products with matching
contextIds.
-
findAllByUriIn
@Policy(operationTypes=READ) List<D> findAllByUriIn(@NonNull Iterable<String> uris, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the products with matchinguris.- Parameters:
uris- The URIs to matchcontextInfo- Request context information around sandbox and multitenant state- Returns:
- All of the products with matching
uris.
-
findAllByCategoryContextId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByCategoryContextId(@NonNull String categoryContextId, @Nullable 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) Finds all products in a given category.- Parameters:
categoryContextId- the context id of the category.isSorted- – Whether to return CategoryProducts where CategoryProduct.sorted is true, else false.filters- additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.page- the requested amount of results from the database. -1 indicates no limit.contextInfo- Request context information around sandbox and multitenant state- Returns:
- All the products in the given category
-