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

All Superinterfaces:
CustomizedProductRepository<D>, com.broadleafcommerce.common.extension.DomainTypeAware, com.broadleafcommerce.common.messaging.notification.NotificationStateRepository, org.springframework.data.repository.Repository<D,String>, com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>
All Known Subinterfaces:
JpaProductRepository<D>

@NoRepositoryBean public interface ProductRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable> extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, CustomizedProductRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>
Author:
Phillip Verheyden (phillipuniverse)
  • Method Details

    • findAllByContextIdIn

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByContextIdIn(@NonNull Collection<String> contextIdList, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves a paged list of products whose context IDs match any of the given IDs.
      Parameters:
      contextIdList - the context IDs to query for
      page - the requested page of results from the database
      contextInfo - context information around sandbox and multitenant state
      Returns:
      a paged list of products whose context IDs match any of the given IDs
    • findAllByExternalIdIn

      @Policy(operationTypes=READ) List<D> findAllByExternalIdIn(@NonNull Collection<String> externalIdList, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Fetches all products whose Product.getExternalId() matches any of the given values.
      Parameters:
      externalIdList - the list of external IDs to query for
      contextInfo - context information around sandbox and multitenant state
      Returns:
      a list of products whose external IDs match any of the given values
    • findByUri

      @Policy(operationTypes=READ) Optional<D> findByUri(@NonNull String uri, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds a product by the given URI
      Parameters:
      uri - the uri to look for
      context - the current context to look in
      Returns:
      an optional containing the Product, or an empty optional if none found
    • findAllByContextIdIn

      @Policy(operationTypes=READ) List<D> findAllByContextIdIn(@NonNull Collection<String> ids, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Return all of the products with IDs in the supplied collection.
      Parameters:
      ids - the products context IDs to search for
      filters - the filters to apply to the search
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      the products that matched with the IDs in the given collection
      Since:
      Catalog Service 2.1.5, Release Train 2.1.5