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 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

      @Autowired @Lazy public void setRepository(CampaignRepository<D> repository)
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.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 interface CustomizedCampaignRepository<D extends JpaCampaign>
      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.
    • getManagedType

      protected final Class<D> getManagedType()
      Helper method to get the underlying Class<D extends JpaCampaign> for the managed entity. The result is usually determined by RepositoryEntityTypeManager.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

      protected CampaignRepository<D> getRepository()