Class RelatedQueryService

java.lang.Object
org.codelibs.fess.app.service.FessAppService
org.codelibs.fess.app.service.RelatedQueryService

public class RelatedQueryService extends FessAppService
Service class for managing related query entities. This service provides operations to retrieve, store, and delete related queries, which are used to suggest alternative search terms to users.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.codelibs.fess.mylasta.direction.FessConfig
    Configuration properties for Fess application.
    protected org.codelibs.fess.opensearch.config.exbhv.RelatedQueryBhv
    Behavior class for accessing related query data in the database.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for RelatedQueryService.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(org.codelibs.fess.opensearch.config.exentity.RelatedQuery relatedQuery)
    Deletes a related query from the database.
    org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.RelatedQuery>
    Retrieves a specific related query by its unique identifier.
    List<org.codelibs.fess.opensearch.config.exentity.RelatedQuery>
    Retrieves a paginated list of related queries based on the provided pager parameters.
    protected void
    setupListCondition(org.codelibs.fess.opensearch.config.cbean.RelatedQueryCB cb, RelatedQueryPager relatedQueryPager)
    Sets up the search conditions for the related query list based on the pager parameters.
    void
    store(org.codelibs.fess.opensearch.config.exentity.RelatedQuery relatedQuery)
    Stores (inserts or updates) a related query in the database.

    Methods inherited from class org.codelibs.fess.app.service.FessAppService

    wrapQuery

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • relatedQueryBhv

      protected org.codelibs.fess.opensearch.config.exbhv.RelatedQueryBhv relatedQueryBhv
      Behavior class for accessing related query data in the database. This provides database operations for RelatedQuery entities.
    • fessConfig

      protected org.codelibs.fess.mylasta.direction.FessConfig fessConfig
      Configuration properties for Fess application. Used to access various configuration settings like paging parameters.
  • Constructor Details

    • RelatedQueryService

      public RelatedQueryService()
      Default constructor for RelatedQueryService. This constructor is used by the DI container to create an instance of the service.
  • Method Details

    • getRelatedQueryList

      public List<org.codelibs.fess.opensearch.config.exentity.RelatedQuery> getRelatedQueryList(RelatedQueryPager relatedQueryPager)
      Retrieves a paginated list of related queries based on the provided pager parameters. This method performs a database query with pagination and updates the pager with result information.
      Parameters:
      relatedQueryPager - the pager containing pagination parameters and search conditions
      Returns:
      a list of RelatedQuery entities matching the search criteria
    • getRelatedQuery

      public org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.RelatedQuery> getRelatedQuery(String id)
      Retrieves a specific related query by its unique identifier.
      Parameters:
      id - the unique identifier of the related query to retrieve
      Returns:
      an OptionalEntity containing the RelatedQuery if found, or empty if not found
    • store

      public void store(org.codelibs.fess.opensearch.config.exentity.RelatedQuery relatedQuery)
      Stores (inserts or updates) a related query in the database. After storing, the related query helper is updated to refresh the cache.
      Parameters:
      relatedQuery - the RelatedQuery entity to store
    • delete

      public void delete(org.codelibs.fess.opensearch.config.exentity.RelatedQuery relatedQuery)
      Deletes a related query from the database. After deletion, the related query helper is updated to refresh the cache.
      Parameters:
      relatedQuery - the RelatedQuery entity to delete
    • setupListCondition

      protected void setupListCondition(org.codelibs.fess.opensearch.config.cbean.RelatedQueryCB cb, RelatedQueryPager relatedQueryPager)
      Sets up the search conditions for the related query list based on the pager parameters. This method configures wildcard searches for term and queries fields, and sets up ordering.
      Parameters:
      cb - the condition bean for building the query
      relatedQueryPager - the pager containing search parameters