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
@DemoTest public class DefaultFlexibleSearchServiceDemoTest extends ServicelayerBaseTest
Tests demonstrating usage of the flexible search service.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description DefaultFlexibleSearchServiceDemoTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
searchModelByExample()
Demonstrates how to use the flexible search service to get any item model by example model.void
searchModelsByExample()
Demonstrates how to use the flexible search service to get list of item models by example model.void
searchWithStandardFlexibleSearchQueryString()
Demonstrates how to do search with usage of standard FlexibleSearch query string.void
searchWithStandardFlexibleSearchQueryStringAndMapOfParameters()
Demonstrates how to do search with usage of standard FlexibleSearch query string with map of search parameters.void
searchWithUseOfFlexibleSearchQueryObjectAndCachingDisabled()
void
searchWithUsingFlexibleSearchQueryObject()
Demonstrates how to do search with usage ofFlexibleSearchQuery
object.void
setUp()
void
translateFlexibleSearchQueryIntoTranslationResult()
Demonstrates how to translateFlexibleSearchQuery
object intoTranslationResult
which contains translated SQL query and list of parameters.-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getApplicationContext, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Method Detail
-
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 translateFlexibleSearchQuery
object intoTranslationResult
which 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 ofFlexibleSearchQuery
object. 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
public void searchWithUseOfFlexibleSearchQueryObjectAndCachingDisabled() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-