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 Summary
FieldsModifier and TypeFieldDescriptionprotected AdditionalSkuSandBoxCollectionHelperprotected Booleanprotected Booleanprotected jakarta.persistence.EntityManagerprotected intprotected ProductOptionXrefSandBoxCollectionHelperprotected org.springframework.context.ApplicationEventPublisherprotected SkuAttributeSandboxCollectionHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbatchFetchSandBoxCollectionMembers(List<Serializable> fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper) voidbatchFetchSandBoxCollectionsForProducts(List<org.broadleafcommerce.core.catalog.domain.Product> products) voidbatchFetchSandBoxCollectionsForSkus(List<org.broadleafcommerce.core.catalog.domain.Sku> queriedSkus) protected voidconvertToEnterpriseCacheRegion(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.static com.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDaoprotected ListgetResultsList(List<Serializable> fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper) getSandBoxCollectionMembers(Serializable fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper) getSandBoxCollectionMembers(List<Serializable> fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper) protected ListpaginatedBatchFetch(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.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Field Details
-
em
protected jakarta.persistence.EntityManager em -
categoryProductXrefSandBoxCollectionHelper
-
productOptionXrefSandBoxCollectionHelper
-
additionalSkuSandBoxCollectionHelper
-
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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
batchFetchSandBoxCollectionsForProducts
public void batchFetchSandBoxCollectionsForProducts(List<org.broadleafcommerce.core.catalog.domain.Product> products) - Specified by:
batchFetchSandBoxCollectionsForProductsin interfacecom.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
-
batchFetchSandBoxCollectionsForSkus
public void batchFetchSandBoxCollectionsForSkus(List<org.broadleafcommerce.core.catalog.domain.Sku> queriedSkus) - Specified by:
batchFetchSandBoxCollectionsForSkusin interfacecom.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
-
batchFetchSandBoxCollectionMembers
public List batchFetchSandBoxCollectionMembers(List<Serializable> fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper) - Specified by:
batchFetchSandBoxCollectionMembersin interfacecom.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
-
getSandBoxCollectionMembers
@Nonnull public List getSandBoxCollectionMembers(Serializable fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper) - Specified by:
getSandBoxCollectionMembersin interfacecom.broadleafcommerce.enterprise.common.dao.batch.EnterpriseCollectionDao
-
getSandBoxCollectionMembers
public List getSandBoxCollectionMembers(List<Serializable> fkValue, com.broadleafcommerce.enterprise.common.dao.batch.SandBoxCollectionHelper helper) - Specified by:
getSandBoxCollectionMembersin interfacecom.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. ThepageSizewill be set via thefetch.collection.batch.pageSizeproperty which will default to800.- 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-
-