Class JpaCustomizedCampaignRepository<D extends JpaCampaign>
java.lang.Object
com.broadleafcommerce.promotion.offer.provider.jpa.repository.JpaCustomizedCampaignRepository<D>
- All Implemented Interfaces:
CustomizedCampaignRepository<D>
,org.springframework.beans.factory.InitializingBean
public class JpaCustomizedCampaignRepository<D extends JpaCampaign>
extends Object
implements CustomizedCampaignRepository<D>, org.springframework.beans.factory.InitializingBean
- Author:
- Nathan Moore (nathandmoore)
-
Constructor Summary
ConstructorDescriptionJpaCustomizedCampaignRepository
(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoid
findAllByContextId
(@NonNull Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all campaigns by ID that are active by active date range.protected com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil
protected com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder
protected jakarta.persistence.EntityManager
Helper method to get the underlyingClass<D extends JpaCampaign>
for the managed entity.protected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelper
protected CampaignRepository<D>
protected com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager
void
setRepository
(CampaignRepository<D> repository) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.promotion.offer.repository.CustomizedCampaignRepository
findByContextIdAndActive
-
Constructor Details
-
JpaCustomizedCampaignRepository
public JpaCustomizedCampaignRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder)
-
-
Method Details
-
setRepository
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
findAllByContextId
public List<D> findAllByContextId(@NonNull @NonNull Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedCampaignRepository
Finds all campaigns by ID that are active by active date range.- Specified by:
findAllByContextId
in interfaceCustomizedCampaignRepository<D extends JpaCampaign>
- Parameters:
contextIds
- The IDs to matchcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- The campaign by ID , or
Optional.empty()
if none.
-
getManagedType
Helper method to get the underlyingClass<D extends JpaCampaign>
for the managed entity. The result is usually determined byRepositoryEntityTypeManager.getManagedType(Class, Class, EntityManager)
.- Returns:
- the
Class<D extends JpaCampaign>
for the managed entity.
-
getBehaviorUtil
protected com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil getBehaviorUtil() -
getRepositoryEntityTypeManager
protected com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager getRepositoryEntityTypeManager() -
getCriteriaBuilder
protected com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder getCriteriaBuilder() -
getNarrowingHelper
protected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelper getNarrowingHelper() -
getEntityManager
protected jakarta.persistence.EntityManager getEntityManager() -
getRepository
-