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 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 for
      contextInfo - 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 given productContextIds.
      Parameters:
      productContextIds - a collection of product context IDs which the results must be associated with
      contextInfo - 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 given productContextIds and skus.
      Parameters:
      productContextIds - a collection of product context IDs which the results must be associated with
      skus - a collection of skus which the results must be associated with
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      all variants which are associated with any of the given productContextIds and skus
    • findAllByVariantOrProductContextId

      @Policy(operationTypes=READ) List<D> findAllByVariantOrProductContextId(@NonNull Iterable<String> variantContextIds, @NonNull Iterable<String> productContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Returns a stream of all the Variants that match either variantContextIds or productContextIds.
      Parameters:
      variantContextIds - Variant IDs to match against
      productContextIds - IDs of parent Products to match against
      context - Request context information around sandbox and multitenant state
      Returns:
      A stream of all the Variants that match either variantContextIds or 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 given productContextIds and the given tenant context.
      Parameters:
      productContextIds - IDs of parent Products to match against
      context - 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