Class MockFlexibleSearchService
- java.lang.Object
-
- de.hybris.platform.sap.orderexchange.mocks.MockFlexibleSearchService
-
- All Implemented Interfaces:
FlexibleSearchService
public class MockFlexibleSearchService extends java.lang.Object implements FlexibleSearchService
Mock to be used for spring tests
-
-
Constructor Summary
Constructors Constructor Description MockFlexibleSearchService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetModelByExample(T arg0)Search for an existing object (in the database) by a given (not saved) example.<T> java.util.List<T>getModelsByExample(T arg0)Search for an existing objects (in the database) by a given (not saved) example.<T> SearchResult<T>search(FlexibleSearchQuery arg0)Search.<T> SearchResult<T>search(java.lang.String arg0)Simplest search available.<T> SearchResult<T>search(java.lang.String arg0, java.util.Map<java.lang.String,? extends java.lang.Object> arg1)Convenience method which internally delegates toFlexibleSearchService.search(FlexibleSearchQuery).<T> SearchResult<T>searchRelation(ItemModel arg0, java.lang.String arg1, int arg2, int arg3)This method is not implemented.<T> SearchResult<T>searchRelation(RelationQuery arg0)This method is not implemented.<T> TsearchUnique(FlexibleSearchQuery arg0)Searches for exactly one model fitting givenFlexibleSearchQuery.TranslationResulttranslate(FlexibleSearchQuery arg0)TranslatesFlexibleSearchQueryintoTranslationResultobject which contains translatedFlexibleSearchQueryto real SQL query and all parameters which will be used in SQL query.
-
-
-
Method Detail
-
getModelByExample
public <T> T getModelByExample(T arg0)
Description copied from interface:FlexibleSearchServiceSearch for an existing object (in the database) by a given (not saved) example. Every modified attribute in this example is used as search parameter.- Specified by:
getModelByExamplein interfaceFlexibleSearchService- Type Parameters:
T- the type of the example and the return type- Parameters:
arg0- the example- Returns:
- the result if this was found by the example.
-
getModelsByExample
public <T> java.util.List<T> getModelsByExample(T arg0)
Description copied from interface:FlexibleSearchServiceSearch for an existing objects (in the database) by a given (not saved) example. Every modified attribute in this example is used as search parameter. Returns all matching results.- Specified by:
getModelsByExamplein interfaceFlexibleSearchService- Type Parameters:
T- the type of the example and the return type- Parameters:
arg0- the example- Returns:
- the list of models found by the example.
-
search
public <T> SearchResult<T> search(FlexibleSearchQuery arg0)
Description copied from interface:FlexibleSearchServiceSearch.- Specified by:
searchin interfaceFlexibleSearchService- Parameters:
arg0- the search query- Returns:
- the search result< t>
-
search
public <T> SearchResult<T> search(java.lang.String arg0)
Description copied from interface:FlexibleSearchServiceSimplest search available.- Specified by:
searchin interfaceFlexibleSearchService- Parameters:
arg0- the query- Returns:
- the search result< t>
-
search
public <T> SearchResult<T> search(java.lang.String arg0, java.util.Map<java.lang.String,? extends java.lang.Object> arg1)
Description copied from interface:FlexibleSearchServiceConvenience method which internally delegates toFlexibleSearchService.search(FlexibleSearchQuery).- Specified by:
searchin interfaceFlexibleSearchService- Parameters:
arg0- query string in flexible search syntaxarg1- additional query parameters; null permitted- Returns:
- the search result< t>
-
searchRelation
public <T> SearchResult<T> searchRelation(RelationQuery arg0)
Description copied from interface:FlexibleSearchServiceThis method is not implemented.- Specified by:
searchRelationin interfaceFlexibleSearchService
-
searchRelation
public <T> SearchResult<T> searchRelation(ItemModel arg0, java.lang.String arg1, int arg2, int arg3)
Description copied from interface:FlexibleSearchServiceThis method is not implemented.- Specified by:
searchRelationin interfaceFlexibleSearchService
-
searchUnique
public <T> T searchUnique(FlexibleSearchQuery arg0)
Description copied from interface:FlexibleSearchServiceSearches for exactly one model fitting givenFlexibleSearchQuery. Throws an exception when more or none results found.- Specified by:
searchUniquein interfaceFlexibleSearchService- Parameters:
arg0- the search query- Returns:
- the search result< t>
-
translate
public TranslationResult translate(FlexibleSearchQuery arg0)
Description copied from interface:FlexibleSearchServiceTranslates
FlexibleSearchQueryintoTranslationResultobject which contains translatedFlexibleSearchQueryto real SQL query and all parameters which will be used in SQL query.Translation also respects
SearchRestrictionModelbased restrictions for types and users.- Specified by:
translatein interfaceFlexibleSearchService- Parameters:
arg0-FlexibleSearchQueryto be translated.- Returns:
TranslationResultobject containing SQL query with parameters.
-
-