Class EnterpriseCollectionDaoImpl

java.lang.Object
com.broadleafcommerce.enterprise.workflow.dao.batch.EnterpriseCollectionDaoImpl
All Implemented Interfaces:
com.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Repository("blEnterpriseCollectionDao") public class EnterpriseCollectionDaoImpl extends Object implements org.springframework.context.ApplicationContextAware, com.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
Author:
Jeff Fischer
See Also:
  • EnterpriseCollectionDao
  • Field Details

    • em

      protected jakarta.persistence.EntityManager em
    • categoryProductXrefSandBoxCollectionHelper

      protected CategoryProductXrefSandBoxCollectionHelper categoryProductXrefSandBoxCollectionHelper
    • productOptionXrefSandBoxCollectionHelper

      protected ProductOptionXrefSandBoxCollectionHelper productOptionXrefSandBoxCollectionHelper
    • additionalSkuSandBoxCollectionHelper

      protected AdditionalSkuSandBoxCollectionHelper additionalSkuSandBoxCollectionHelper
    • skuAttributeSandBoxCollectionHelper

      protected SkuAttributeSandboxCollectionHelper skuAttributeSandBoxCollectionHelper
    • allowSandBoxCollectionBatchFetch

      @Value("${allow.resultset.sandbox.collection.batch.fetch:false}") protected Boolean allowSandBoxCollectionBatchFetch
    • allowParentCategorySandBoxCollectionBatchFetch

      @Value("${allow.parentcategory.resultset.sandbox.collection.batch.fetch:false}") protected Boolean allowParentCategorySandBoxCollectionBatchFetch
    • pageSize

      @Value("${fetch.collection.batch.pageSize:800}") protected int pageSize
    • publisher

      @Autowired protected org.springframework.context.ApplicationEventPublisher publisher
  • Constructor Details

    • EnterpriseCollectionDaoImpl

      public EnterpriseCollectionDaoImpl()
  • Method Details

    • getEnterpriseCollectionDao

      public static com.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao getEnterpriseCollectionDao()
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • batchFetchSandBoxCollectionsForProducts

      public void batchFetchSandBoxCollectionsForProducts(List<org.broadleafcommerce.core.catalog.domain.Product> products)
      Specified by:
      batchFetchSandBoxCollectionsForProducts in interface com.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
    • batchFetchSandBoxCollectionsForSkus

      public void batchFetchSandBoxCollectionsForSkus(List<org.broadleafcommerce.core.catalog.domain.Sku> queriedSkus)
      Specified by:
      batchFetchSandBoxCollectionsForSkus in interface com.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
    • batchFetchSandBoxCollectionMembers

      public List batchFetchSandBoxCollectionMembers(List<Serializable> fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper)
      Specified by:
      batchFetchSandBoxCollectionMembers in interface com.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
    • getSandBoxCollectionMembers

      @Nonnull public List getSandBoxCollectionMembers(Serializable fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper)
      Specified by:
      getSandBoxCollectionMembers in interface com.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
    • getSandBoxCollectionMembers

      public List getSandBoxCollectionMembers(List<Serializable> fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper)
      Specified by:
      getSandBoxCollectionMembers in interface com.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
    • paginatedBatchFetch

      protected List paginatedBatchFetch(List<Serializable> fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper)
      If the passed in list is larger then the page size, paginate the query to prevent parameter size limit from DB dialects. The pageSize will be set via the fetch.collection.batch.pageSize property which will default to 800.
      Parameters:
      fkValue -
      helper -
      Returns:
    • getResultsList

      protected List getResultsList(List<Serializable> fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper)
    • convertToEnterpriseCacheRegion

      protected void convertToEnterpriseCacheRegion(com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper, jakarta.persistence.Query query)
      If a cacheRegion was specified on the collection, provide a configurable opportunity to override the cache config per region. This converter provides a simple mapping between annotated cacheRegion and enterprise configured cache regions.
      Parameters:
      helper -
      query -