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

All Known Subinterfaces:
JpaPriceDataRepository<D>, PriceDataRepository<D>
All Known Implementing Classes:
JpaCustomizedPriceDataRepository

public interface CustomizedPriceDataRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Author:
Nick Crum ncrum
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<D>
    findByPriceListIdAndTarget(String priceListId, String targetType, Collection<String> targetIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    org.springframework.data.domain.Page<D>
    findByPriceListIdAndTarget(String priceListId, String targetType, Collection<String> targetIds, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deprecated, for removal: This API element is subject to removal in a future version.
    findByTargetAndPriceListId(com.broadleafcommerce.pricing.client.domain.PriceableTargetRef target, String priceListId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    findByTargetInAndPriceListIdsIn(Collection<com.broadleafcommerce.pricing.client.domain.PriceableTargetRef> targets, Collection<String> listIds, boolean filterByVendor, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds a list of price data by the given PriceableTargetRefs and price list ids.
    default List<D>
    findByTargetInAndPriceListIdsIn(Collection<com.broadleafcommerce.pricing.client.domain.PriceableTargetRef> targets, Collection<String> listIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    readAllByPriceListId(String priceListId, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Reads all JpaPriceData by the given price list id.
  • Method Details

    • findByPriceListIdAndTarget

      @Deprecated(since="1.7.2", forRemoval=true) org.springframework.data.domain.Page<D> findByPriceListIdAndTarget(@Nullable String priceListId, @Nullable String targetType, Collection<String> targetIds, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • findByPriceListIdAndTarget

      @NonNull org.springframework.data.domain.Page<D> findByPriceListIdAndTarget(@Nullable String priceListId, @Nullable String targetType, Collection<String> targetIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • findByTargetInAndPriceListIdsIn

      @NonNull default List<D> findByTargetInAndPriceListIdsIn(@NonNull Collection<com.broadleafcommerce.pricing.client.domain.PriceableTargetRef> targets, @NonNull Collection<String> listIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • findByTargetInAndPriceListIdsIn

      @NonNull List<D> findByTargetInAndPriceListIdsIn(@NonNull Collection<com.broadleafcommerce.pricing.client.domain.PriceableTargetRef> targets, @NonNull Collection<String> listIds, boolean filterByVendor, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds a list of price data by the given PriceableTargetRefs and price list ids.
      Parameters:
      targets - a list of PriceableTargetRefs to match
      listIds - a list of price list ids to look for
      filterByVendor - whether to also filter the price data based on the {@link {@link PriceableTargetRef#getVendorRef()}
      contextInfo - the current context
      Returns:
      a list of price data by the given PriceableTargetRefs and price list ids
    • findByTargetAndPriceListId

      @NonNull Optional<D> findByTargetAndPriceListId(@NonNull com.broadleafcommerce.pricing.client.domain.PriceableTargetRef target, @NonNull String priceListId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • readAllByPriceListId

      Stream<D> readAllByPriceListId(String priceListId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads all JpaPriceData by the given price list id.

      This method explicitly fetches the ids and then fetches the entities by the ids to avoid using the SQL offset for the sake of performance, which is used under the hood in JpaNarrowExecutor when the query is a page query.