Class DefaultSettingsRelevancyRuleGroupService<P extends com.broadleafcommerce.search.api.domain.SettingsRelevancyRuleGroup>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.search.core.service.settingsrelevancyrulegroup.DefaultSettingsRelevancyRuleGroupService<P>
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>, SettingsRelevancyRuleGroupService<P>

public class DefaultSettingsRelevancyRuleGroupService<P extends com.broadleafcommerce.search.api.domain.SettingsRelevancyRuleGroup> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements SettingsRelevancyRuleGroupService<P>
Default implementation of SettingsRelevancyRuleGroupService<com.broadleafcommerce.search.api.domain.SettingsRelevancyRuleGroup>
Since:
Search Service 2.2.0, Release Train 2.2.0
Author:
karanjariwala
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultSettingsRelevancyRuleGroupService(SettingsRelevancyRuleGroupRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    existsBySettingsIdAndGroupIndexableType(String searchSettingsId, String groupIndexableType, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Returns whether there is a relationship for the given relevancy rule group indexable type and search settings in the data store.
    protected com.broadleafcommerce.common.extension.cache.CacheStateManager
     
    protected SettingsRelevancyRuleGroupRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    readAllBySearchSettingsContextIdAndIndexableType(String searchSettingsContextId, String indexableType, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Returns all SettingsRelevancyRuleGroups by indexable type and search settings id.
    org.springframework.data.domain.Page<P>
    readBySearchSettingsContextId(String searchSettingsContextId, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads a page of SettingsRelevancyRuleGroup relationships associated with the given SearchSettings ID.

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService

    getRsqlHelper, readAll, readAll, readAll, readAll

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService

    convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

    create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

    readAll, readAll, readAll, readAll
  • Field Details

    • CACHE_RELEVANCY_RULE_GROUP_BY_SEARCH_SETTINGS_AND_INDEXABLE_TYPE

      public static final String CACHE_RELEVANCY_RULE_GROUP_BY_SEARCH_SETTINGS_AND_INDEXABLE_TYPE
      See Also:
  • Constructor Details

    • DefaultSettingsRelevancyRuleGroupService

      public DefaultSettingsRelevancyRuleGroupService(SettingsRelevancyRuleGroupRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, @Nullable com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager)
  • Method Details

    • readBySearchSettingsContextId

      public org.springframework.data.domain.Page<P> readBySearchSettingsContextId(String searchSettingsContextId, @Nullable org.springframework.data.domain.Pageable page, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: SettingsRelevancyRuleGroupService
      Reads a page of SettingsRelevancyRuleGroup relationships associated with the given SearchSettings ID.
      Specified by:
      readBySearchSettingsContextId in interface SettingsRelevancyRuleGroupService<P extends com.broadleafcommerce.search.api.domain.SettingsRelevancyRuleGroup>
      page - the requested page of results from the database
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
      a page of SettingsRelevancyRuleGroup relationships associated with the given SearchSettings ID
    • existsBySettingsIdAndGroupIndexableType

      public boolean existsBySettingsIdAndGroupIndexableType(String searchSettingsId, String groupIndexableType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: SettingsRelevancyRuleGroupService
      Returns whether there is a relationship for the given relevancy rule group indexable type and search settings in the data store.
      Specified by:
      existsBySettingsIdAndGroupIndexableType in interface SettingsRelevancyRuleGroupService<P extends com.broadleafcommerce.search.api.domain.SettingsRelevancyRuleGroup>
      Parameters:
      searchSettingsId - the search settings context ID
      groupIndexableType - the indexable type of the relevancy rule group
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
      true if a relationship was found between the relevancy rule group type and search settings, false otherwise
    • readAllBySearchSettingsContextIdAndIndexableType

      public List<P> readAllBySearchSettingsContextIdAndIndexableType(String searchSettingsContextId, String indexableType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: SettingsRelevancyRuleGroupService
      Returns all SettingsRelevancyRuleGroups by indexable type and search settings id.
      Specified by:
      readAllBySearchSettingsContextIdAndIndexableType in interface SettingsRelevancyRuleGroupService<P extends com.broadleafcommerce.search.api.domain.SettingsRelevancyRuleGroup>
      Parameters:
      searchSettingsContextId - the search settings context ID
      indexableType - the indexable type of the relevancy rule group
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
      All SettingsRelevancyRuleGroups by indexable type and search settings id.
    • getRepository

      @NonNull protected SettingsRelevancyRuleGroupRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()
      Overrides:
      getRepository in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends com.broadleafcommerce.search.api.domain.SettingsRelevancyRuleGroup>
    • getCacheStateManager

      @Nullable protected com.broadleafcommerce.common.extension.cache.CacheStateManager getCacheStateManager()