Interface CustomizedVariantRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Known Subinterfaces:
JpaVariantRepository<D>
,VariantRepository<D>
- All Known Implementing Classes:
JpaCustomizedVariantRepository
public interface CustomizedVariantRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Additional functionality for a
VariantRepository
.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByContextIdIn
(Collection<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves all variants whose context IDs match any of the given IDs.findAllByProductContextIdIn
(Collection<String> productContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the variants which are associated with any of the givenproductContextIds
.findAllByVariantOrProductContextId
(Iterable<String> variantContextIds, Iterable<String> productContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
Method Details
-
findAllByContextIdIn
@Policy(operationTypes=READ) Stream<D> findAllByContextIdIn(@NonNull Collection<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves all variants whose context IDs match any of the given IDs.- Parameters:
contextIds
- the context IDs to query forcontextInfo
- context information around sandbox and multitenant state- Returns:
- all variants whose context IDs match any of the given IDs
-
findAllByProductContextIdIn
@Policy(operationTypes=READ) Stream<D> findAllByProductContextIdIn(Collection<String> productContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the variants 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 variants which are associated with any of the given
productContextIds
-
findAllByVariantOrProductContextId
@Policy(operationTypes=READ) List<D> findAllByVariantOrProductContextId(@NonNull Iterable<String> variantContextIds, @NonNull Iterable<String> productContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Parameters:
variantContextIds
- Variant IDs to match againstproductContextIds
- IDs of parent Products to match againstcontext
- Request context information around sandbox and multitenant state- Returns:
- A stream of all the
Variants
that match eithervariantContextIds
orproductContextIds
.
-