Class EnterpriseSearchBoostRuleDaoImpl
java.lang.Object
com.broadleafcommerce.search.service.EnterpriseSearchBoostRuleDaoImpl
- All Implemented Interfaces:
EnterpriseSearchBoostRuleDao
@Repository("blEnterpriseSearchBoostRuleDao")
public class EnterpriseSearchBoostRuleDaoImpl
extends Object
implements EnterpriseSearchBoostRuleDao
- Author:
- Nick Crum (ncrum)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidattachActiveRestriction(Date currentDate, jakarta.persistence.criteria.Path<? extends BoostRule> rule, List<jakarta.persistence.criteria.Predicate> restrictions) findCategoryBoostRule(org.broadleafcommerce.core.search.domain.IndexFieldType indexFieldType, BoostRuleType boostRuleType) Finds and returns only a single CategoryBoostRule for the parametersfindCategoryBoostRules(List<Long> categoryIds, BoostRuleType boostRuleType) findGlobalBoostRule(org.broadleafcommerce.core.search.domain.IndexFieldType indexFieldType, BoostRuleType boostRuleType) Finds and returns only a single GlobalBoostRule for the parametersfindGlobalBoostRules(BoostRuleType boostRuleType) Finds and returns the GlobalBoostRule's for the given IndexFieldType and BoostRuleTypeReturns the number of milliseconds that the current date/time will be cached for queries before refreshing.voidsetCurrentDateResolution(Long currentDateResolution) Sets the number of milliseconds that the current date/time will be cached for queries before refreshing.
-
Field Details
-
em
protected jakarta.persistence.EntityManager em -
entityConfiguration
protected org.broadleafcommerce.common.persistence.EntityConfiguration entityConfiguration -
sandBoxHelper
protected org.broadleafcommerce.common.sandbox.SandBoxHelper sandBoxHelper -
dialectHelper
protected org.broadleafcommerce.common.util.DialectHelper dialectHelper -
currentDateResolution
-
cachedDate
-
-
Constructor Details
-
EnterpriseSearchBoostRuleDaoImpl
public EnterpriseSearchBoostRuleDaoImpl()
-
-
Method Details
-
findGlobalBoostRule
public GlobalBoostRule findGlobalBoostRule(org.broadleafcommerce.core.search.domain.IndexFieldType indexFieldType, BoostRuleType boostRuleType) Description copied from interface:EnterpriseSearchBoostRuleDaoFinds and returns only a single GlobalBoostRule for the parameters- Specified by:
findGlobalBoostRulein interfaceEnterpriseSearchBoostRuleDao- Parameters:
indexFieldType- the IndexFieldType to matchboostRuleType- the BoostRuleType to match- Returns:
- a GlobalBoostRule, if one exists
-
findCategoryBoostRule
public CategoryBoostRule findCategoryBoostRule(org.broadleafcommerce.core.search.domain.IndexFieldType indexFieldType, BoostRuleType boostRuleType) Description copied from interface:EnterpriseSearchBoostRuleDaoFinds and returns only a single CategoryBoostRule for the parameters- Specified by:
findCategoryBoostRulein interfaceEnterpriseSearchBoostRuleDao- Parameters:
indexFieldType- the IndexFieldType to matchboostRuleType- the boostRuleType to match- Returns:
- a CategoryBoostRule, if one exists
-
findCategoryBoostRules
public List<CategoryBoostRule> findCategoryBoostRules(List<Long> categoryIds, BoostRuleType boostRuleType) - Specified by:
findCategoryBoostRulesin interfaceEnterpriseSearchBoostRuleDao
-
findGlobalBoostRules
Description copied from interface:EnterpriseSearchBoostRuleDaoFinds and returns the GlobalBoostRule's for the given IndexFieldType and BoostRuleType- Specified by:
findGlobalBoostRulesin interfaceEnterpriseSearchBoostRuleDao- Parameters:
boostRuleType- the BoostRuleType to match- Returns:
- list of GlobalBoostRule's
-
attachActiveRestriction
-
getCurrentDateResolution
Description copied from interface:EnterpriseSearchBoostRuleDaoReturns the number of milliseconds that the current date/time will be cached for queries before refreshing. This aids in query caching, otherwise every query that utilized current date would be different and caching would be ineffective.- Specified by:
getCurrentDateResolutionin interfaceEnterpriseSearchBoostRuleDao- Returns:
- the milliseconds to cache the current date/time
-
setCurrentDateResolution
Description copied from interface:EnterpriseSearchBoostRuleDaoSets the number of milliseconds that the current date/time will be cached for queries before refreshing. This aids in query caching, otherwise every query that utilized current date would be different and caching would be ineffective.- Specified by:
setCurrentDateResolutionin interfaceEnterpriseSearchBoostRuleDao- Parameters:
currentDateResolution- the milliseconds to cache the current date/time
-