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 SearchService
SearchService.AbstractSearchParameters, SearchService.SearchParameters -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSearchServiceImpl(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 RowloadRow(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:
searchin interfaceSearchService- Throws:
PersistExceptionRpcExecutionException
-
searchForRemoteField
public DetailedGridResultData searchForRemoteField(SearchService.SearchParameters searchParameters) throws PersistException, RpcExecutionException - Specified by:
searchForRemoteFieldin interfaceSearchService- Throws:
PersistExceptionRpcExecutionException
-
createSearchQuery
public Query createSearchQuery(SearchService.SearchParameters searchParameters, FulltextSearchBuilder.SearchScope searchScope) Description copied from interface:SearchServicegenerates a query from parameters that can be used to start a search- Specified by:
createSearchQueryin interfaceSearchService- Parameters:
searchParameters- the parameters to generate the query fromsearchScope- the scope to generate the query for- Returns:
- the finished query
-
getDefaultSearchFilters
- Specified by:
getDefaultSearchFiltersin interfaceSearchService- Throws:
PersistException
-
searchForKeys
public PrimaryKey[] searchForKeys(SearchService.SearchParameters searchParameters) throws PersistException, RpcExecutionException Description copied from interface:SearchServiceReturns the primary keys of all that match. No order, no offset/limit.- Specified by:
searchForKeysin interfaceSearchService- Throws:
PersistExceptionRpcExecutionException
-
relationSearch
public DetailedGridResultData relationSearch(SearchService.SearchParameters relationSearchParameters) throws PersistException, RpcExecutionException Description copied from interface:SearchServiceThis is used for the relations grid where all objects in relation to another record are shown.Example: all addresses for a person.
- Specified by:
relationSearchin interfaceSearchService- Throws:
PersistExceptionRpcExecutionException
-
relationSearchForKeys
public PrimaryKey[] relationSearchForKeys(SearchService.SearchParameters relationSearchParameters) throws PersistException, RpcExecutionException Description copied from interface:SearchServiceReturns the primary keys of all that match. No order, no offset/limit.- Specified by:
relationSearchForKeysin interfaceSearchService- Throws:
PersistExceptionRpcExecutionException
-
generateSearchQueryString
public String generateSearchQueryString(SearchService.SearchParameters searchParameters) throws PersistException, RpcExecutionException - Specified by:
generateSearchQueryStringin interfaceSearchService- Throws:
PersistExceptionRpcExecutionException
-
loadRow
public Row loadRow(Entity entity, boolean skipDefaultDisplay, Iterable<Column> visibleColumns) throws RpcExecutionException, PersistException - Specified by:
loadRowin interfaceSearchService- Throws:
RpcExecutionExceptionPersistException
-
loadRow
@Nullable public @Nullable Row loadRow(String key, String entityModel, boolean skipDefaultDisplay, String formName, List<String> visibleColumns) throws RpcExecutionException, PersistException - Specified by:
loadRowin interfaceSearchService- Throws:
RpcExecutionExceptionPersistException
-