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

All Superinterfaces:
CustomizedOfferCodeRepository<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:
JpaOfferCodeRepository<D>

@NoRepositoryBean public interface OfferCodeRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable> extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>, CustomizedOfferCodeRepository<D>
Repository for persistent counter-parts of OfferCode.
Author:
Karan Jariwala (karan-j-blc)
  • Method Details

    • findByCampaignId

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findByCampaignId(String campaignId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • findByOfferId

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findByOfferId(String offerId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • findByGeneratorIdAndCodeIn

      @Policy(operationTypes=READ) List<D> findByGeneratorIdAndCodeIn(String generatorId, List<String> codeStrings)
    • findByCampaignIdAndCodeIn

      @Policy(operationTypes=READ) List<D> findByCampaignIdAndCodeIn(String campaignId, List<String> codeStrings)
    • findAllByGeneratorIdAndAssigned

      @Policy(operationTypes=READ) List<D> findAllByGeneratorIdAndAssigned(String generatorId, boolean isAssigned, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds all the offer codes with the given code generator id and isAssigned flag.
      Parameters:
      generatorId - the id of the code generator that these codes were generated from
      isAssigned - whether or not the offer codes are assigned
      context - context information surrounding sandboxing and multi tenant state
      Returns:
      the offer codes with the given code generator id and isAssigned flag