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 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.findAllByContextIdIn
(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
.findAllByProductContextIdInAndSkuIn
(Collection<String> productContextIds, Collection<String> skus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all variants which are associated with any of the givenproductContextIds
andskus
.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
-
findAllByProductContextIdInAndSkuIn
@Policy(operationTypes=READ) Stream<D> findAllByProductContextIdInAndSkuIn(Collection<String> productContextIds, Collection<String> skus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all variants which are associated with any of the givenproductContextIds
andskus
.- Parameters:
productContextIds
- a collection of product context IDs which the results must be associated withskus
- a collection of skus which the results must be associated withcontextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- all variants which are associated with any of the given
productContextIds
andskus
-
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
.
-
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
-