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

Type Parameters:
D - Type of Trackable entity. Should be the persistent counterpart to a CategoryProduct.
All Known Subinterfaces:
CategoryProductRepository<D>, JpaCategoryProductRepository<D>
All Known Implementing Classes:
JpaCustomizedCategoryProductRepository

public interface CustomizedCategoryProductRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to CategoryProduct maintenance and filtering.
Author:
Nathan Moore (nathandmoore)
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<D>
    findAllByCategoryIdAndIsSorted(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)
    Returns all CategoryProducts for the given Category.id where Sortable.getSorted() is true.
    org.springframework.data.domain.Page<D>
    findAllByCategoryIdAndProductIds(String categoryContextId, List<String> productIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Returns all CategoryProducts for the given Category.id and Product's ID.
    org.springframework.data.domain.Page<D>
    findAllByCategoryIdAndProductIdsAndIsSorted(String categoryContextId, List<String> productIds, boolean isSorted, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Returns all CategoryProducts for the given Category.id and Product's ID where Sortable.getSorted() is true.
    findAllByProductContextIdIn(Collection<String> productContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the category products which are associated with any of the given productContextIds.
  • Method Details

    • findAllByCategoryIdAndIsSorted

      @NonNull @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByCategoryIdAndIsSorted(@NonNull String categoryContextId, 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)
      Returns all CategoryProducts for the given Category.id where Sortable.getSorted() is true.
      Parameters:
      categoryContextId - a Category's ID for which to find all sorted CategoryProducts.
      isSorted - Whether to return CategoryProducts where CategoryProduct.sorted is true else where false.
      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 - context surrounding sandboxing and multitenant state
      Returns:
      all CategoryProducts for the given Category.id where Sortable.getSorted() is true.
    • findAllByCategoryIdAndProductIdsAndIsSorted

      @NonNull @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByCategoryIdAndProductIdsAndIsSorted(@NonNull String categoryContextId, @Nullable List<String> productIds, 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)
      Returns all CategoryProducts for the given Category.id and Product's ID where Sortable.getSorted() is true.
      Parameters:
      categoryContextId - a Category's ID for which to find all sorted CategoryProducts.
      productIds - the list of Product's ID to retrieve
      isSorted - Whether to return CategoryProducts where CategoryProduct.sorted is true else where false.
      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 - context surrounding sandboxing and multitenant state
      Returns:
      all CategoryProducts for the given Category.id where Sortable.getSorted() is true.
    • findAllByCategoryIdAndProductIds

      @NonNull @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByCategoryIdAndProductIds(@NonNull String categoryContextId, @Nullable List<String> productIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Returns all CategoryProducts for the given Category.id and Product's ID.
      Parameters:
      categoryContextId - a Category's ID for which to find all sorted CategoryProducts.
      productIds - the list of Product's ID to retrieve
      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 - context surrounding sandboxing and multitenant state
      Returns:
      all CategoryProducts for the given Category.id where Sortable.getSorted() is true.
    • findAllByProductContextIdIn

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