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

All Superinterfaces:
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>
All Known Subinterfaces:
JpaCodeGeneratorRepository<D>

@NoRepositoryBean public interface CodeGeneratorRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable> extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>
Repository for persistent counter-parts of com.broadleafcommerce.promotion.campaign.domain.CodeGenerator.
Author:
Chad Harchar (charchar)
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<D>
    findByCampaignId(String campaignId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    findByCampaignIdAndVoucherCodeGenerator(String campaignId, boolean isVoucherCodeGenerator, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Finds a code generator that is for the given campaign id and is for voucher offers in the data store.
    default Optional<D>
    findByCampaignIdAndVoucherCodeGeneratorAndActive(String campaignId, boolean isVoucherCodeGenerator, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Finds an active code generator that is for the given campaign id and is for voucher offers in the data store.

    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
  • Method Details

    • findByCampaignId

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findByCampaignId(String campaignId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • findByCampaignIdAndVoucherCodeGeneratorAndActive

      @Policy(operationTypes=READ) default Optional<D> findByCampaignIdAndVoucherCodeGeneratorAndActive(String campaignId, boolean isVoucherCodeGenerator, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds an active code generator that is for the given campaign id and is for voucher offers in the data store.
      Parameters:
      campaignId - the campaign id that the code generator is for
      isVoucherCodeGenerator - whether this code generator is for voucher offers
      context - context information surrounding sandboxing and multi tenant state
      Returns:
      an active code generator that is for the given campaign id and is for voucher offers
    • findByCampaignIdAndVoucherCodeGenerator

      @Policy(operationTypes=READ) Optional<D> findByCampaignIdAndVoucherCodeGenerator(String campaignId, boolean isVoucherCodeGenerator, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds a code generator that is for the given campaign id and is for voucher offers in the data store.
      Parameters:
      campaignId - the campaign id that the code generator is for
      isVoucherCodeGenerator - whether this code generator is for voucher offers
      context - context information surrounding sandboxing and multi tenant state
      Returns:
      a code generator that is for the given campaign id and is for voucher offers