Class SearchServiceImpl
java.lang.Object
ch.tocco.nice2.netui.impl.bind.entity.SearchServiceImpl
- All Implemented Interfaces:
SearchService
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.netui.api.bind.entity.SearchService
SearchService.AbstractSearchParameters, SearchService.SearchParameters
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSearchServiceImpl
(DataModel dataModel, Context context, EntityListService entityListService, InternalSearchService internalSearchService, FormModel formModel, QueryBuilderFactory queryBuilderFactory, LocaleResolverService localeResolverService, org.slf4j.Logger log) -
Method Summary
Modifier and TypeMethodDescriptioncreateSearchQuery
(SearchService.SearchParameters searchParameters, FulltextSearchBuilder.SearchScope searchScope) generates a query from parameters that can be used to start a searchgenerateSearchQueryString
(SearchService.SearchParameters searchParameters) @Nullable Row
loadRow
(String key, String entityModel, boolean skipDefaultDisplay, String formName, List<String> visibleColumns) relationSearch
(SearchService.SearchParameters relationSearchParameters) This is used for the relations grid where all objects in relation to another record are shown.relationSearchForKeys
(SearchService.SearchParameters relationSearchParameters) Returns the primary keys of all that match.search
(SearchService.SearchParameters searchParameters) impl notes: i would have preferred to make separate api methods for the client for the different ways of loading data.searchForKeys
(SearchService.SearchParameters searchParameters) Returns the primary keys of all that match.searchForRemoteField
(SearchService.SearchParameters searchParameters)
-
Field Details
-
formModel
-
-
Constructor Details
-
SearchServiceImpl
public SearchServiceImpl(DataModel dataModel, Context context, EntityListService entityListService, InternalSearchService internalSearchService, FormModel formModel, QueryBuilderFactory queryBuilderFactory, LocaleResolverService localeResolverService, org.slf4j.Logger log)
-
-
Method Details
-
search
public DetailedGridResultData search(SearchService.SearchParameters searchParameters) throws PersistException, RpcExecutionException impl notes: i would have preferred to make separate api methods for the client for the different ways of loading data. unfortunately the ext Store and DataProxy classes are not flexible and don't allow changing at runtime. thus the whole objects would have to be replaced on a GridPanel to load data in different ways. hacking it like this into one method was the much simpler solution.- Specified by:
search
in interfaceSearchService
- Throws:
PersistException
RpcExecutionException
-
searchForRemoteField
public DetailedGridResultData searchForRemoteField(SearchService.SearchParameters searchParameters) throws PersistException, RpcExecutionException - Specified by:
searchForRemoteField
in interfaceSearchService
- Throws:
PersistException
RpcExecutionException
-
createSearchQuery
public Query createSearchQuery(SearchService.SearchParameters searchParameters, FulltextSearchBuilder.SearchScope searchScope) Description copied from interface:SearchService
generates a query from parameters that can be used to start a search- Specified by:
createSearchQuery
in interfaceSearchService
- Parameters:
searchParameters
- the parameters to generate the query fromsearchScope
- the scope to generate the query for- Returns:
- the finished query
-
getDefaultSearchFilters
- Specified by:
getDefaultSearchFilters
in interfaceSearchService
- Throws:
PersistException
-
searchForKeys
public PrimaryKey[] searchForKeys(SearchService.SearchParameters searchParameters) throws PersistException, RpcExecutionException Description copied from interface:SearchService
Returns the primary keys of all that match. No order, no offset/limit.- Specified by:
searchForKeys
in interfaceSearchService
- Throws:
PersistException
RpcExecutionException
-
relationSearch
public DetailedGridResultData relationSearch(SearchService.SearchParameters relationSearchParameters) throws PersistException, RpcExecutionException Description copied from interface:SearchService
This is used for the relations grid where all objects in relation to another record are shown.Example: all addresses for a person.
- Specified by:
relationSearch
in interfaceSearchService
- Throws:
PersistException
RpcExecutionException
-
relationSearchForKeys
public PrimaryKey[] relationSearchForKeys(SearchService.SearchParameters relationSearchParameters) throws PersistException, RpcExecutionException Description copied from interface:SearchService
Returns the primary keys of all that match. No order, no offset/limit.- Specified by:
relationSearchForKeys
in interfaceSearchService
- Throws:
PersistException
RpcExecutionException
-
generateSearchQueryString
public String generateSearchQueryString(SearchService.SearchParameters searchParameters) throws PersistException, RpcExecutionException - Specified by:
generateSearchQueryString
in interfaceSearchService
- Throws:
PersistException
RpcExecutionException
-
loadRow
public Row loadRow(Entity entity, boolean skipDefaultDisplay, Iterable<Column> visibleColumns) throws RpcExecutionException, PersistException - Specified by:
loadRow
in interfaceSearchService
- Throws:
RpcExecutionException
PersistException
-
loadRow
@Nullable public @Nullable Row loadRow(String key, String entityModel, boolean skipDefaultDisplay, String formName, List<String> visibleColumns) throws RpcExecutionException, PersistException - Specified by:
loadRow
in interfaceSearchService
- Throws:
RpcExecutionException
PersistException
-