Class JpaCustomizedOptionTemplateRepository<D extends JpaOptionTemplate>

java.lang.Object
com.broadleafcommerce.catalog.provider.jpa.repository.option.JpaCustomizedOptionTemplateRepository<D>
Type Parameters:
D - the domain type being managed
All Implemented Interfaces:
CustomizedOptionTemplateRepository<D>, org.springframework.beans.factory.InitializingBean

public class JpaCustomizedOptionTemplateRepository<D extends JpaOptionTemplate> extends Object implements CustomizedOptionTemplateRepository<D>, org.springframework.beans.factory.InitializingBean
Since:
CatalogServices 2.1.5, CatalogServices 2.2.1
  • Constructor Details

    • JpaCustomizedOptionTemplateRepository

      public JpaCustomizedOptionTemplateRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder catalogFilterRuleCriteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager)
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • findAllByCategoryContextIdIn

      public List<D> findAllByCategoryContextIdIn(Collection<String> categoryContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Notably, the implementation of this method is expected to be safe against large result sizes. Normally, when the domain has been extended and the total result size is large, Hibernate's 'IN' query to join the base and extended domains can exceed query size limits. The implementation of this method is responsible for transparently batching the results internally to avoid that error before returning the full result set to the caller.
      Specified by:
      findAllByCategoryContextIdIn in interface CustomizedOptionTemplateRepository<D extends JpaOptionTemplate>
      Parameters:
      categoryContextIds - the category context IDs to query for
      contextInfo - the context to perform the operation in
      Returns:
      a list of option templates whose category context IDs match any of the given IDs
    • findBatchByCategoryContextIdIn

      protected List<D> findBatchByCategoryContextIdIn(Iterable<String> categoryContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, int batchSize, @Nullable String previousBatchLastId)
    • buildNativeIdGreaterThanFilter

      protected jakarta.persistence.criteria.Predicate buildNativeIdGreaterThanFilter(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.Root<D> optionTemplateEntity, String nativeIdValue, Map<String,Object> parameterValues, String nativeIdParamName)
    • buildCategoryContextIdInFilter

      protected jakarta.persistence.criteria.Predicate buildCategoryContextIdInFilter(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.Root<D> optionTemplateEntity, Iterable<String> categoryContextIdValues, Map<String,Object> parameterValues, String categoryContextIdsParamName)
    • getManagedType

      protected Class<D> getManagedType()
    • getRepository

      protected OptionTemplateRepository<D> getRepository()
    • setRepository

      @Autowired @Lazy public void setRepository(OptionTemplateRepository<D> repository)
    • getRepositoryProperties

      protected OptionTemplateRepositoryProperties getRepositoryProperties()
    • setRepositoryProperties

      @Autowired public void setRepositoryProperties(OptionTemplateRepositoryProperties repositoryProperties)