Class DefaultFlexibleSearchServiceDemoTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchServiceDemoTest
- All Implemented Interfaces:
JaloSessionHolder
Tests demonstrating usage of the flexible search service.
-
Field Summary
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDemonstrates how to use the flexible search service to get any item model by example model.voidDemonstrates how to use the flexible search service to get list of item models by example model.voidDemonstrates how to do search with usage of standard FlexibleSearch query string.voidDemonstrates how to do search with usage of standard FlexibleSearch query string with map of search parameters.voidvoidDemonstrates how to do search with usage ofFlexibleSearchQueryobject.voidsetUp()voidDemonstrates how to translateFlexibleSearchQueryobject intoTranslationResultwhich contains translated SQL query and list of parameters.Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getApplicationContext, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Constructor Details
-
DefaultFlexibleSearchServiceDemoTest
public DefaultFlexibleSearchServiceDemoTest()
-
-
Method Details
-
setUp
public void setUp() -
searchModelByExample
public void searchModelByExample()Demonstrates how to use the flexible search service to get any item model by example model. Test scenario:
- prepare new model as example
- search for any model with usage of methodFlexibleSearchService#getModelByExample(Object) -
searchModelsByExample
public void searchModelsByExample()Demonstrates how to use the flexible search service to get list of item models by example model. Test scenario:
- prepare new model as example
- search for list of models with usage of methodFlexibleSearchService#getModelsByExample(Object) -
translateFlexibleSearchQueryIntoTranslationResult
public void translateFlexibleSearchQueryIntoTranslationResult()Demonstrates how to translateFlexibleSearchQueryobject intoTranslationResultwhich contains translated SQL query and list of parameters. Test scenario:
- prepare new model as example
- search for list of models with usage of methodFlexibleSearchService#getModelsByExample(Object) -
searchWithUsingFlexibleSearchQueryObject
public void searchWithUsingFlexibleSearchQueryObject()Demonstrates how to do search with usage ofFlexibleSearchQueryobject. Test scenario:
- prepare flexible search query object with search criteria
- search for list of models with usage of methodFlexibleSearchService#search(FlexibleSearchQuery) -
searchWithStandardFlexibleSearchQueryString
public void searchWithStandardFlexibleSearchQueryString()Demonstrates how to do search with usage of standard FlexibleSearch query string.
From security point of view this methods is not recommended when you have to use search parameters - in such case please useFlexibleSearchService.search(String, Map). Test scenario:
- prepare FlexibleSearch query string
- search for list of models with usage of methodFlexibleSearchService#search(String) -
searchWithStandardFlexibleSearchQueryStringAndMapOfParameters
public void searchWithStandardFlexibleSearchQueryStringAndMapOfParameters()Demonstrates how to do search with usage of standard FlexibleSearch query string with map of search parameters.
Test scenario:
- prepare FlexibleSearch query string and map of parameters
- search for list of models with usage of methodFlexibleSearchService#search(String, Map) -
searchWithUseOfFlexibleSearchQueryObjectAndCachingDisabled
- Throws:
Exception
-