Interface CustomizedCampaignRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- Type Parameters:
D- The type of the persistent version ofCampaignfor 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 TypeMethodDescriptionfindAllByContextId(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all campaigns by ID that are active by active date range.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 matchcontextInfo- 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 matchcontextInfo- Request context information around sandbox and multitenant state- Returns:
- The campaign by ID , or
Optional.empty()if none.
-