Class DefaultFacetGroupFacetService<P extends com.broadleafcommerce.search.api.domain.FacetGroupFacet>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.search.core.service.facetgroupfacet.DefaultFacetGroupFacetService<P>
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>, FacetGroupFacetService<P>

public class DefaultFacetGroupFacetService<P extends com.broadleafcommerce.search.api.domain.FacetGroupFacet> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements FacetGroupFacetService<P>
  • Field Summary

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

    Constructors
    Constructor
    Description
    DefaultFacetGroupFacetService(FacetGroupFacetRepository<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
    existsByJoinedIds(String facetId, String facetGroupId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Returns whether there is a facet group/facet relationship for the given facet and facet group in the data store.
    protected com.broadleafcommerce.common.extension.cache.CacheStateManager
     
    protected FacetGroupFacetRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    boolean
    hasNonProductionRecordsByFacetIdsInTenant(Collection<String> facetIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Returns true if there is non-production FacetGroupFacet that match the given facetIds and the given context.
    readAllByFacetGroupId(String facetGroupContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all FacetGroupFacet relationships associated with the given FacetGroup ID.
    readAllByFacetId(String facetId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all FacetGroupFacet relationships associated with the given Facet ID.
    org.springframework.data.domain.Page<P>
    readByFacetGroupContextId(String facetGroupContextId, 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 FacetGroupFacet relationships associated with the given FacetGroup ID.
    org.springframework.data.domain.Page<P>
    readByFacetGroupContextIdAndIsSorted(String facetGroupContextId, Boolean isSorted, 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 FacetGroupFacet relationships associated with the given FacetGroup 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

  • Constructor Details

    • DefaultFacetGroupFacetService

      public DefaultFacetGroupFacetService(FacetGroupFacetRepository<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

    • readByFacetGroupContextId

      public org.springframework.data.domain.Page<P> readByFacetGroupContextId(String facetGroupContextId, @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: FacetGroupFacetService
      Reads a page of FacetGroupFacet relationships associated with the given FacetGroup ID.
      Specified by:
      readByFacetGroupContextId in interface FacetGroupFacetService<P extends com.broadleafcommerce.search.api.domain.FacetGroupFacet>
      Parameters:
      facetGroupContextId - the facet group ID to filter on
      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 FacetGroupFacet relationships associated with the given FacetGroup ID
    • readByFacetGroupContextIdAndIsSorted

      public org.springframework.data.domain.Page<P> readByFacetGroupContextIdAndIsSorted(String facetGroupContextId, @Nullable Boolean isSorted, @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: FacetGroupFacetService
      Reads a page of FacetGroupFacet relationships associated with the given FacetGroup ID.
      Specified by:
      readByFacetGroupContextIdAndIsSorted in interface FacetGroupFacetService<P extends com.broadleafcommerce.search.api.domain.FacetGroupFacet>
      Parameters:
      facetGroupContextId - the facet group ID to filter on
      isSorted - Whether to read only FacetGroupFacet that have a sort value.
      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 FacetGroupFacet relationships associated with the given FacetGroup ID
    • readAllByFacetGroupId

      public List<P> readAllByFacetGroupId(String facetGroupContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FacetGroupFacetService
      Reads all FacetGroupFacet relationships associated with the given FacetGroup ID.
      Specified by:
      readAllByFacetGroupId in interface FacetGroupFacetService<P extends com.broadleafcommerce.search.api.domain.FacetGroupFacet>
      Parameters:
      facetGroupContextId - the facet group ID to filter on
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
      All FacetGroupFacet relationships associated with the given FacetGroup ID
    • existsByJoinedIds

      public boolean existsByJoinedIds(String facetId, String facetGroupId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FacetGroupFacetService
      Returns whether there is a facet group/facet relationship for the given facet and facet group in the data store.
      Specified by:
      existsByJoinedIds in interface FacetGroupFacetService<P extends com.broadleafcommerce.search.api.domain.FacetGroupFacet>
      Parameters:
      facetId - the facet context ID
      facetGroupId - the facet group context ID
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
      true if a relationship was found between the facet and facet group, false otherwise
    • readAllByFacetId

      public List<P> readAllByFacetId(String facetId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FacetGroupFacetService
      Reads all FacetGroupFacet relationships associated with the given Facet ID.
      Specified by:
      readAllByFacetId in interface FacetGroupFacetService<P extends com.broadleafcommerce.search.api.domain.FacetGroupFacet>
      Parameters:
      facetId - the facet ID to filter on
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
      All FacetGroupFacet relationships associated with the given Facet ID
    • hasNonProductionRecordsByFacetIdsInTenant

      public boolean hasNonProductionRecordsByFacetIdsInTenant(Collection<String> facetIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FacetGroupFacetService
      Returns true if there is non-production FacetGroupFacet that match the given facetIds and the given context.
      Specified by:
      hasNonProductionRecordsByFacetIdsInTenant in interface FacetGroupFacetService<P extends com.broadleafcommerce.search.api.domain.FacetGroupFacet>
      Parameters:
      facetIds - IDs of the Facet to match against
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      true if there is non-production records that match the given facetIds and the given context, and false otherwise
    • getRepository

      @NonNull protected FacetGroupFacetRepository<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.FacetGroupFacet>
    • getCacheStateManager

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