Class CategoryBoostRuleImpl
java.lang.Object
com.broadleafcommerce.search.domain.CategoryBoostRuleImpl
- All Implemented Interfaces:
BoostRule,CategoryBoostRule,CategoryBoostRuleAdminPresentation,Serializable,org.broadleafcommerce.common.copy.MultiTenantCloneable<CategoryBoostRule>
@Entity
public class CategoryBoostRuleImpl
extends Object
implements CategoryBoostRule, CategoryBoostRuleAdminPresentation
- Author:
- Nick Crum (ncrum)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.broadleafcommerce.search.domain.CategoryBoostRuleAdminPresentation
CategoryBoostRuleAdminPresentation.GroupName, CategoryBoostRuleAdminPresentation.GroupOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DateThe active end date.protected DateThe active start date.protected BigDecimalprotected org.broadleafcommerce.core.catalog.domain.Categoryprotected Booleanprotected Longprotected org.broadleafcommerce.core.search.domain.IndexFieldTypeprotected Stringprotected BigDecimalprotected Stringprotected Stringprotected StringFields inherited from interface com.broadleafcommerce.search.domain.CategoryBoostRuleAdminPresentation
INDEX_FIELD_TYPE_CUSTOM_CRITERIA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends CategoryBoostRule>
org.broadleafcommerce.common.copy.CreateResponse<G>createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) booleangetBoost()org.broadleafcommerce.core.catalog.domain.CategoryThis flag decides whether or not a RELATIVE/ORDINAL BoostRule boosts results by highest or lowest value Only set for BoostRuleType.RELATIVE/ORDINALgetId()org.broadleafcommerce.core.search.domain.IndexFieldTypeThis value is used by MATCHING_VALUE BoostRule to get the matching value for this SearchFieldType in the boost query.This returns the minimum possible score for this boost rule.getName()This returns the name that describes this rule.getType()This determines how we apply this BoostRule.inthashCode()booleanisActive()voidsetActiveEndDate(Date activeEndDate) voidsetActiveStartDate(Date activeStartDate) voidsetBoost(BigDecimal boost) voidsetCategory(org.broadleafcommerce.core.catalog.domain.Category category) voidsetDescending(Boolean descending) voidvoidsetIndexFieldType(org.broadleafcommerce.core.search.domain.IndexFieldType indexFieldType) voidsetMatchValue(String matchValue) voidsetMinimumScore(BigDecimal minimumScore) voidvoidsetSearchTermQualifierRegex(String searchTermQualifierRegex) voidsetType(BoostRuleType type)
-
Field Details
-
id
-
name
-
indexFieldType
protected org.broadleafcommerce.core.search.domain.IndexFieldType indexFieldType -
activeStartDate
The active start date. -
activeEndDate
The active end date. -
type
-
boost
-
minimumScore
-
descending
-
matchValue
-
searchTermQualifierRegex
-
category
protected org.broadleafcommerce.core.catalog.domain.Category category
-
-
Constructor Details
-
CategoryBoostRuleImpl
public CategoryBoostRuleImpl()
-
-
Method Details
-
getId
-
setId
-
getCategory
public org.broadleafcommerce.core.catalog.domain.Category getCategory()- Specified by:
getCategoryin interfaceCategoryBoostRule
-
setCategory
public void setCategory(org.broadleafcommerce.core.catalog.domain.Category category) - Specified by:
setCategoryin interfaceCategoryBoostRule
-
getBoost
-
setBoost
-
getMinimumScore
Description copied from interface:BoostRuleThis returns the minimum possible score for this boost rule. This ONLY applies to MATCHING, ORDINAL, and RELATIVE boost rule types. This wraps the value expression passed to the boost parameter in the Solr query with a max(). The result is that the value given to the boost parameter will never be less than this value.- Specified by:
getMinimumScorein interfaceBoostRule- Returns:
- the minimum value for this rule
-
setMinimumScore
- Specified by:
setMinimumScorein interfaceBoostRule
-
getName
Description copied from interface:BoostRuleThis returns the name that describes this rule. -
setName
-
getIndexFieldType
public org.broadleafcommerce.core.search.domain.IndexFieldType getIndexFieldType()- Specified by:
getIndexFieldTypein interfaceBoostRule
-
setIndexFieldType
public void setIndexFieldType(org.broadleafcommerce.core.search.domain.IndexFieldType indexFieldType) - Specified by:
setIndexFieldTypein interfaceBoostRule
-
getType
Description copied from interface:BoostRuleThis determines how we apply this BoostRule. Defaults to SEARCH_QUERY -
setType
-
getMatchValue
Description copied from interface:BoostRuleThis value is used by MATCHING_VALUE BoostRule to get the matching value for this SearchFieldType in the boost query. Only set for BoostRuleType.MATCHING_VALUE- Specified by:
getMatchValuein interfaceBoostRule- Returns:
- the matchValue for this BoostRule
-
setMatchValue
- Specified by:
setMatchValuein interfaceBoostRule
-
getDescending
Description copied from interface:BoostRuleThis flag decides whether or not a RELATIVE/ORDINAL BoostRule boosts results by highest or lowest value Only set for BoostRuleType.RELATIVE/ORDINAL- Specified by:
getDescendingin interfaceBoostRule- Returns:
- whether this is descending or not, false by default
-
setDescending
- Specified by:
setDescendingin interfaceBoostRule
-
getActiveStartDate
- Specified by:
getActiveStartDatein interfaceBoostRule
-
setActiveStartDate
- Specified by:
setActiveStartDatein interfaceBoostRule
-
getActiveEndDate
- Specified by:
getActiveEndDatein interfaceBoostRule
-
setActiveEndDate
- Specified by:
setActiveEndDatein interfaceBoostRule
-
isActive
public boolean isActive() -
getSearchTermQualifierRegex
- Specified by:
getSearchTermQualifierRegexin interfaceBoostRule
-
setSearchTermQualifierRegex
- Specified by:
setSearchTermQualifierRegexin interfaceBoostRule
-
createOrRetrieveCopyInstance
public <G extends CategoryBoostRule> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceorg.broadleafcommerce.common.copy.MultiTenantCloneable<CategoryBoostRule>- Throws:
CloneNotSupportedException
-
equals
-
hashCode
public int hashCode()
-