public class DefaultFlexibleSearchService extends AbstractBusinessService implements FlexibleSearchService
AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultFlexibleSearchService() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> SearchResultImpl<T> |
createEmptyResult(SearchResult<T> jaloResult) |
ConverterRegistry |
getConverterRegistry() |
<T> T |
getModelByExample(T example)
Search for an existing object (in the database) by a given (not saved) example.
|
protected ModelConverter |
getModelConverterByModel(Object model) |
<T> List<T> |
getModelsByExample(T example)
Search for an existing objects (in the database) by a given (not saved) example.
|
ModelSearchStrategy |
getModelSearchStrategy() |
QueryPreprocessorRegistry |
getQueryPreprocessorRegistry() |
protected String |
getSourceTypeFromModel(Object model) |
ConverterRegistry |
lookupConverterRegistry()
Must be overwritten! Use <lookup-method> in spring.
|
ModelSearchStrategy |
lookupModelSearchStrategy()
Must be overwritten! Use <lookup-method> in spring.
|
QueryPreprocessorRegistry |
lookupQueryPreprocessorRegistry() |
<T> SearchResult<T> |
search(FlexibleSearchQuery query)
Search.
|
<T> SearchResult<T> |
search(String query)
Simplest search available.
|
<T> SearchResult<T> |
search(String query,
Map<String,? extends Object> queryParams)
Convenience method which internally delegates to
FlexibleSearchService.search(FlexibleSearchQuery). |
<T> SearchResult<T> |
searchRelation(ItemModel model,
String attribute,
int start,
int count)
This method is not implemented.
|
<T> SearchResult<T> |
searchRelation(RelationQuery query)
This method is not implemented.
|
<T> T |
searchUnique(FlexibleSearchQuery searchQuery)
Searches for exactly one model fitting given
FlexibleSearchQuery. |
void |
setModelResolver(ItemObjectResolver modelResolver) |
void |
setMultiModelResolver(ItemObjectResolver multiModelResolver) |
<T> T |
toPersistenceLayer(Object modelValue) |
TranslationResult |
translate(FlexibleSearchQuery query)
Translates
FlexibleSearchQuery into TranslationResult object which contains translated
FlexibleSearchQuery to real SQL query and all parameters which will be used in SQL query. |
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplacepublic ConverterRegistry getConverterRegistry()
public <T> T getModelByExample(T example)
FlexibleSearchServicegetModelByExample in interface FlexibleSearchServiceT - the type of the example and the return typeexample - the examplepublic <T> List<T> getModelsByExample(T example)
FlexibleSearchServicegetModelsByExample in interface FlexibleSearchServiceT - the type of the example and the return typeexample - the examplepublic ModelSearchStrategy getModelSearchStrategy()
public QueryPreprocessorRegistry getQueryPreprocessorRegistry()
public ConverterRegistry lookupConverterRegistry()
public ModelSearchStrategy lookupModelSearchStrategy()
public QueryPreprocessorRegistry lookupQueryPreprocessorRegistry()
public <T> SearchResult<T> search(FlexibleSearchQuery query)
search in interface FlexibleSearchServicequery - the search queryprotected <T> SearchResultImpl<T> createEmptyResult(SearchResult<T> jaloResult)
public <T> SearchResult<T> search(String query)
search in interface FlexibleSearchServicequery - the querypublic <T> SearchResult<T> search(String query, Map<String,? extends Object> queryParams)
FlexibleSearchService.search(FlexibleSearchQuery).search in interface FlexibleSearchServicequery - query string in flexible search syntaxqueryParams - additional query parameters; null permittedpublic <T> SearchResult<T> searchRelation(ItemModel model, String attribute, int start, int count)
searchRelation in interface FlexibleSearchServicepublic <T> SearchResult<T> searchRelation(RelationQuery query)
searchRelation in interface FlexibleSearchServicepublic <T> T searchUnique(FlexibleSearchQuery searchQuery)
FlexibleSearchQuery. Throws an exception when more or none
results found.searchUnique in interface FlexibleSearchServicesearchQuery - the search querypublic void setModelResolver(ItemObjectResolver modelResolver)
public void setMultiModelResolver(ItemObjectResolver multiModelResolver)
public TranslationResult translate(FlexibleSearchQuery query)
Translates FlexibleSearchQuery into TranslationResult object which contains translated
FlexibleSearchQuery to real SQL query and all parameters which will be used in SQL query.
Translation also respects SearchRestrictionModel based restrictions for types and users.
translate in interface FlexibleSearchServicequery - FlexibleSearchQuery to be translated.TranslationResult object containing SQL query with parameters.protected ModelConverter getModelConverterByModel(Object model)
public <T> T toPersistenceLayer(Object modelValue)
Copyright © 2017 SAP SE. All Rights Reserved.