Package org.chenile.query.service
Class AbstractSearchServiceImpl
java.lang.Object
org.chenile.query.service.AbstractSearchServiceImpl
- All Implemented Interfaces:
SearchService<Map<String,
Object>>
- Direct Known Subclasses:
NamedQueryServiceSpringMybatisImpl
public abstract class AbstractSearchServiceImpl
extends Object
implements SearchService<Map<String,Object>>
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected ContextContainer
(package private) org.slf4j.Logger
protected static final String
protected static final String
protected QueryStore
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
buildOrderByClause
(Map<String, Object> filters, List<SortCriterion> sortCriteria, QueryMetadata queryMetadata) protected void
constructBetweenQuery
(Map<String, Object> enhancedFilters, String name, Object value, ColumnMetadata columnMetadata) protected void
protected void
constructPagination
(Map<String, Object> filters, int startRow, int numRowsInPage) protected abstract SearchResponse
doSearch
(AbstractSearchServiceImpl.EnhancedSearchRequest searchInput, SearchResponse searchResponse, QueryMetadata queryMetadata) protected void
enhanceFiltersUsingMetadata
(AbstractSearchServiceImpl.EnhancedSearchRequest searchInput, QueryMetadata queryMetadata) Use the column metadata to enhance the filters that have been passed.protected void
enhanceFiltersWithPropNamesPropValues
(Map<String, Object> filters) executeQuery
(AbstractSearchServiceImpl.EnhancedSearchRequest searchRequest) protected State
extractStateFromObject
(Object obj, String stateColumn, String flowColumn) getAllowedActionsForWorkflowEntity
(String workflowName, Object obj, String stateColumn, String flowColumn) protected Collection<String>
getAllowedStatesForCurrentUser
(String workflowName) protected SearchResponse
makeSearchResponse
(QueryMetadata queryMetadata, AbstractSearchServiceImpl.EnhancedSearchRequest searchInput) private void
mergeSearchRequests
(SearchRequest<Map<String, Object>> one, SearchRequest<Map<String, Object>> two) protected abstract int
processCountQuery
(Map<String, Object> filters, SearchResponse searchResponse, QueryMetadata queryMetadata) final SearchResponse
search
(SearchRequest<Map<String, Object>> searchRequest) void
setContextContainer
(ContextContainer contextContainer) protected void
setPaginationInResponse
(SearchResponse searchResponse, int maxRows) void
setQueryStore
(QueryStore queryStore)
-
Field Details
-
logger
org.slf4j.Logger logger -
PAGINATION_PART
- See Also:
-
ORDER_BY
- See Also:
-
queryStore
-
contextContainer
-
-
Constructor Details
-
AbstractSearchServiceImpl
-
-
Method Details
-
search
- Specified by:
search
in interfaceSearchService<Map<String,
Object>>
-
enhanceFiltersUsingMetadata
protected void enhanceFiltersUsingMetadata(AbstractSearchServiceImpl.EnhancedSearchRequest searchInput, QueryMetadata queryMetadata) Use the column metadata to enhance the filters that have been passed.- Parameters:
searchInput
-
-
constructBetweenQuery
-
constructContainsQuery
-
enhanceFiltersWithPropNamesPropValues
-
buildOrderByClause
protected void buildOrderByClause(Map<String, Object> filters, List<SortCriterion> sortCriteria, QueryMetadata queryMetadata) -
doSearch
protected abstract SearchResponse doSearch(AbstractSearchServiceImpl.EnhancedSearchRequest searchInput, SearchResponse searchResponse, QueryMetadata queryMetadata) -
setQueryStore
-
makeSearchResponse
protected SearchResponse makeSearchResponse(QueryMetadata queryMetadata, AbstractSearchServiceImpl.EnhancedSearchRequest searchInput) -
setContextContainer
-
getAllowedActionsForWorkflowEntity
-
getAllowedStatesForCurrentUser
-
extractStateFromObject
-
mergeSearchRequests
private void mergeSearchRequests(SearchRequest<Map<String, Object>> one, SearchRequest<Map<String, Object>> two) -
processCountQuery
protected abstract int processCountQuery(Map<String, Object> filters, SearchResponse searchResponse, QueryMetadata queryMetadata) -
executeQuery
protected abstract List<Object> executeQuery(AbstractSearchServiceImpl.EnhancedSearchRequest searchRequest) -
setPaginationInResponse
-
constructPagination
-