Interface CustomizedProductAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>

Type Parameters:
D - the type of Trackable entity which is the persistent counterpart to a ProductAsset
All Known Subinterfaces:
JpaProductAssetRepository<D>, ProductAssetRepository<D>
All Known Implementing Classes:
JpaCustomizedProductAssetRepository

public interface CustomizedProductAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to ProductAsset maintenance and filtering.
Author:
Samarth Dhruva (samarthd)
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    countNonProductionRecordsByProductIdsInTenant(Iterable<String> productContextIds, 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.
    findAllByProductContextIdIn(Collection<String> productContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the product assets which are associated with any of the given productContextIds.
    findAllByProductContextIdIn(Collection<String> productContextIds, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the product assets which are associated with any of the given productContextIds.
    org.springframework.data.domain.Page<D>
    searchAllWithProductContextId(String productContextId, Boolean isSorted, String searchString, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all ProductAssets for the given product context ID, optionally filtering by additional search/filter arguments.
  • Method Details

    • searchAllWithProductContextId

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> searchAllWithProductContextId(String productContextId, @Nullable Boolean isSorted, @Nullable String searchString, cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all ProductAssets for the given product context ID, optionally filtering by additional search/filter arguments.

      If searchString is provided, then this method will search for assets whose EntityAsset.url, EntityAsset.title, EntityAsset.altText, or EntityAsset.tags contain it.

      If no searchString is provided, then this method will simply return all assets for the given product.

      This method also supports RSQL filtration via filters.

      Parameters:
      productContextId - the value which the product context ID should match against
      isSorted - (optional) if not-null, will restrict results to only include ProductAssets where ProductAsset.sorted has the given value
      searchString - (optional) a string which should be found in EntityAsset.url, EntityAsset.title, EntityAsset.altText, or EntityAsset.tags
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - the context to query within
      Returns:
      the assets in the database with the given product context ID, optionally filtered by the given search/filter arguments (if provided)
    • findAllByProductContextIdIn

      @Policy(operationTypes=READ) Stream<D> findAllByProductContextIdIn(Collection<String> productContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all of the product assets 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 product assets which are associated with any of the given productContextIds
    • findAllByProductContextIdIn

      @Policy(operationTypes=READ) Stream<D> findAllByProductContextIdIn(Collection<String> productContextIds, cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all of the product assets which are associated with any of the given productContextIds.
      Parameters:
      productContextIds - a collection of product context IDs which the results must be associated with
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      all of the product assets 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 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