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

Type Parameters:
D - The type of the persistent version of Campaign for a specific data store implementation
All Known Subinterfaces:
CampaignRepository<D>, JpaCampaignRepository<D>
All Known Implementing Classes:
JpaCustomizedCampaignRepository

public interface CustomizedCampaignRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Provides advanced functionality for Campaigns that require manually implemented queries rather than through Spring Data.
Author:
Nathan Moore (nathandmoore)
  • Method Summary

    Modifier and Type
    Method
    Description
    findAllByContextId(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all campaigns by ID that are active by active date range.
    default Optional<D>
    findByContextIdAndActive(String contextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds a campaign by ID.
  • Method Details

    • findByContextIdAndActive

      @Policy(operationTypes=READ) default Optional<D> findByContextIdAndActive(String contextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds a campaign by ID.
      Parameters:
      contextId - The ID to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      The campaign by ID, or Optional.empty() if none.
    • findAllByContextId

      @Policy(operationTypes=READ) List<D> findAllByContextId(Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all campaigns by ID that are active by active date range.
      Parameters:
      contextIds - The IDs to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      The campaign by ID , or Optional.empty() if none.