Package org.codelibs.fess.app.service
Class RelatedQueryService
java.lang.Object
org.codelibs.fess.app.service.FessAppService
org.codelibs.fess.app.service.RelatedQueryService
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
FieldsModifier and TypeFieldDescriptionprotected org.codelibs.fess.mylasta.direction.FessConfigConfiguration properties for Fess application.protected org.codelibs.fess.opensearch.config.exbhv.RelatedQueryBhvBehavior class for accessing related query data in the database. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(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> getRelatedQueryList(RelatedQueryPager relatedQueryPager) Retrieves a paginated list of related queries based on the provided pager parameters.protected voidsetupListCondition(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.voidstore(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
-
Field Details
-
fessConfig
protected org.codelibs.fess.mylasta.direction.FessConfig fessConfigConfiguration 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 queryrelatedQueryPager- the pager containing search parameters
-