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 Summary

    Modifier and Type
    Method
    Description
    findAllByGeneratorIdAndAssigned(String generatorId, boolean isAssigned, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Finds all the offer codes with the given code generator id and isAssigned flag.
    org.springframework.data.domain.Page<D>
    findByCampaignId(String campaignId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    findByGeneratorIdAndCodeIn(String generatorId, List<String> codeStrings)
     
    org.springframework.data.domain.Page<D>
    findByOfferId(String offerId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     

    Methods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository

    findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRepository

    archive, existsByContextId, findAll, findAll, findAll, findAll, findAll, findAll, findAllByContextId, findByContextId, findByContextIdAndCatalog, findByNativeId, findDeployable, findMaxSortMember, findMinSortMember, findOriginal, findPromotable, findPromoteOrientedItems, findRebasable, findRejectable, findRevertable, findTarget, getDomainType, getEntityInformation, getTrackableBehaviorUtil, getTypesToRegisterInMappingContext, pruneChangeDetails, pruneRestingNotificationStates, purgeObsoleteSandboxData, save, saveAll, setTrackableBehaviorUtil

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor

    exists, findAll, findAll, findAll, findAll
  • 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)
    • 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