Class DefaultRelevancyRuleGroupRuleService<P extends com.broadleafcommerce.search.api.domain.RelevancyRuleGroupRule>
java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.search.core.service.relevancygrouprule.DefaultRelevancyRuleGroupRuleService<P>
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>,RelevancyRuleGroupRuleService<P>
public class DefaultRelevancyRuleGroupRuleService<P extends com.broadleafcommerce.search.api.domain.RelevancyRuleGroupRule>
extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
implements RelevancyRuleGroupRuleService<P>
- Since:
- Search Service 2.2.0, Release Train 2.2.0
- Author:
- karanjariwala
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultRelevancyRuleGroupRuleService(RelevancyRuleGroupRuleRepository<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 TypeMethodDescriptionbooleanexistsByJoinedIds(String relevancyRuleId, String relevancyRuleGroupId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns whether there is a relevancy rule group/relevancy rule relationship for the given relevancy rule and relevancy rule group in the data store.protected @NonNull com.broadleafcommerce.common.extension.cache.CacheStateManagerprotected @NonNull RelevancyRuleGroupRuleRepository<com.broadleafcommerce.data.tracking.core.Trackable>readAllByRelevancyGroupId(@NonNull String relevancyGroupContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads allRelevancyRuleGroupRulerelationships associated with the givenRelevancyRuleGroupID.org.springframework.data.domain.Page<P>readByRelevancyGroupContextId(String relevancyGroupContextId, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads a page ofRelevancyRuleGroupRulerelationships associated with the givenRelevancyRuleGroupID.Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAllMethods 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, updateSortMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, updateSortMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Field Details
-
CACHE_BY_RELEVANCY_RULE_GROUP
- See Also:
-
-
Constructor Details
-
DefaultRelevancyRuleGroupRuleService
public DefaultRelevancyRuleGroupRuleService(RelevancyRuleGroupRuleRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager)
-
-
Method Details
-
readByRelevancyGroupContextId
public org.springframework.data.domain.Page<P> readByRelevancyGroupContextId(String relevancyGroupContextId, @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:RelevancyRuleGroupRuleServiceReads a page ofRelevancyRuleGroupRulerelationships associated with the givenRelevancyRuleGroupID.- Specified by:
readByRelevancyGroupContextIdin interfaceRelevancyRuleGroupRuleService<P extends com.broadleafcommerce.search.api.domain.RelevancyRuleGroupRule>- Parameters:
relevancyGroupContextId- the relevancy rule group ID to filter onpage- the requested page of results from the databasefilters- 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
RelevancyRuleGroupRulerelationships associated with the givenRelevancyRuleGroupID
-
readAllByRelevancyGroupId
public List<P> readAllByRelevancyGroupId(@NonNull @NonNull String relevancyGroupContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:RelevancyRuleGroupRuleServiceReads allRelevancyRuleGroupRulerelationships associated with the givenRelevancyRuleGroupID.- Specified by:
readAllByRelevancyGroupIdin interfaceRelevancyRuleGroupRuleService<P extends com.broadleafcommerce.search.api.domain.RelevancyRuleGroupRule>- Parameters:
relevancyGroupContextId- the relevancy rule group ID to filter oncontextInfo- context surrounding sandboxing and multitenant state- Returns:
- All
RelevancyRuleGroupRulerelationships associated with the givenRelevancyRuleGroupID
-
existsByJoinedIds
public boolean existsByJoinedIds(String relevancyRuleId, String relevancyRuleGroupId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:RelevancyRuleGroupRuleServiceReturns whether there is a relevancy rule group/relevancy rule relationship for the given relevancy rule and relevancy rule group in the data store.- Specified by:
existsByJoinedIdsin interfaceRelevancyRuleGroupRuleService<P extends com.broadleafcommerce.search.api.domain.RelevancyRuleGroupRule>- Parameters:
relevancyRuleId- the relevancy rule context IDrelevancyRuleGroupId- the relevancy rule group context IDcontextInfo- context surrounding sandboxing and multitenant state- Returns:
- true if a relationship was found between the relevancy rule and relevancy rule group, false otherwise
-
getRepository
@NonNull protected @NonNull RelevancyRuleGroupRuleRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()- Overrides:
getRepositoryin classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends com.broadleafcommerce.search.api.domain.RelevancyRuleGroupRule>
-
getCacheStateManager
@NonNull protected @NonNull com.broadleafcommerce.common.extension.cache.CacheStateManager getCacheStateManager()
-