Class GlobalBoostRuleImpl

java.lang.Object
com.broadleafcommerce.search.domain.GlobalBoostRuleImpl
All Implemented Interfaces:
BoostRule, GlobalBoostRule, GlobalBoostRuleAdminPresentation, Serializable, org.broadleafcommerce.common.copy.MultiTenantCloneable<GlobalBoostRule>

@Entity public class GlobalBoostRuleImpl extends Object implements GlobalBoostRule, GlobalBoostRuleAdminPresentation
Author:
Nick Crum (ncrum)
See Also:
  • Field Details

    • id

      protected Long id
    • name

      protected String name
    • indexFieldType

      protected org.broadleafcommerce.core.search.domain.IndexFieldType indexFieldType
    • activeStartDate

      protected Date activeStartDate
      The active start date.
    • activeEndDate

      protected Date activeEndDate
      The active end date.
    • type

      protected String type
    • boost

      protected BigDecimal boost
    • minimumScore

      protected BigDecimal minimumScore
    • descending

      protected Boolean descending
    • matchValue

      protected String matchValue
    • applyToCategory

      protected Boolean applyToCategory
    • searchTermQualifierRegex

      protected String searchTermQualifierRegex
  • Constructor Details

    • GlobalBoostRuleImpl

      public GlobalBoostRuleImpl()
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface BoostRule
    • setId

      public void setId(Long id)
      Specified by:
      setId in interface BoostRule
    • getBoost

      public BigDecimal getBoost()
      Specified by:
      getBoost in interface BoostRule
    • setBoost

      public void setBoost(BigDecimal boost)
      Specified by:
      setBoost in interface BoostRule
    • getMinimumScore

      public BigDecimal getMinimumScore()
      Description copied from interface: BoostRule
      This 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:
      getMinimumScore in interface BoostRule
      Returns:
      the minimum value for this rule
    • setMinimumScore

      public void setMinimumScore(BigDecimal minimumScore)
      Specified by:
      setMinimumScore in interface BoostRule
    • getName

      public String getName()
      Description copied from interface: BoostRule
      This returns the name that describes this rule.
      Specified by:
      getName in interface BoostRule
      Returns:
      a String name for this rule
    • setName

      public void setName(String name)
      Specified by:
      setName in interface BoostRule
    • getIndexFieldType

      public org.broadleafcommerce.core.search.domain.IndexFieldType getIndexFieldType()
      Specified by:
      getIndexFieldType in interface BoostRule
    • setIndexFieldType

      public void setIndexFieldType(org.broadleafcommerce.core.search.domain.IndexFieldType indexFieldType)
      Specified by:
      setIndexFieldType in interface BoostRule
    • getType

      public BoostRuleType getType()
      Description copied from interface: BoostRule
      This determines how we apply this BoostRule. Defaults to SEARCH_QUERY
      Specified by:
      getType in interface BoostRule
      Returns:
      BoostRuleType of SEARCH_QUERY, MATCHING_VALUE, RELATIVE, or ORDINAL
    • setType

      public void setType(BoostRuleType type)
      Specified by:
      setType in interface BoostRule
    • getMatchValue

      public String getMatchValue()
      Description copied from interface: BoostRule
      This 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:
      getMatchValue in interface BoostRule
      Returns:
      the matchValue for this BoostRule
    • setMatchValue

      public void setMatchValue(String matchValue)
      Specified by:
      setMatchValue in interface BoostRule
    • getDescending

      public Boolean getDescending()
      Description copied from interface: BoostRule
      This flag decides whether or not a RELATIVE/ORDINAL BoostRule boosts results by highest or lowest value Only set for BoostRuleType.RELATIVE/ORDINAL
      Specified by:
      getDescending in interface BoostRule
      Returns:
      whether this is descending or not, false by default
    • setDescending

      public void setDescending(Boolean descending)
      Specified by:
      setDescending in interface BoostRule
    • setApplyToCategory

      public void setApplyToCategory(Boolean applyToCategory)
      Specified by:
      setApplyToCategory in interface GlobalBoostRule
    • getApplyToCategory

      public Boolean getApplyToCategory()
      Specified by:
      getApplyToCategory in interface GlobalBoostRule
    • getActiveStartDate

      public Date getActiveStartDate()
      Specified by:
      getActiveStartDate in interface BoostRule
    • setActiveStartDate

      public void setActiveStartDate(Date activeStartDate)
      Specified by:
      setActiveStartDate in interface BoostRule
    • getActiveEndDate

      public Date getActiveEndDate()
      Specified by:
      getActiveEndDate in interface BoostRule
    • setActiveEndDate

      public void setActiveEndDate(Date activeEndDate)
      Specified by:
      setActiveEndDate in interface BoostRule
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface BoostRule
    • getSearchTermQualifierRegex

      public String getSearchTermQualifierRegex()
      Specified by:
      getSearchTermQualifierRegex in interface BoostRule
    • setSearchTermQualifierRegex

      public void setSearchTermQualifierRegex(String searchTermQualifierRegex)
      Specified by:
      setSearchTermQualifierRegex in interface BoostRule
    • createOrRetrieveCopyInstance

      public <G extends GlobalBoostRule> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext multiTenantCopyContext) throws CloneNotSupportedException
      Specified by:
      createOrRetrieveCopyInstance in interface org.broadleafcommerce.common.copy.MultiTenantCloneable<GlobalBoostRule>
      Throws:
      CloneNotSupportedException