public abstract class AbstractPuiElasticSearchService extends Object
| Modifier and Type | Field and Description |
|---|---|
protected es.prodevelop.pui9.model.dao.registry.DaoRegistry |
daoRegistry |
protected org.apache.commons.logging.Log |
logger |
protected IPuiElasticSearchEnablement |
puiElasticSearchEnablement |
protected static String |
STRING_SEPARATOR |
| Constructor and Description |
|---|
AbstractPuiElasticSearchService() |
| Modifier and Type | Method and Description |
|---|---|
protected org.elasticsearch.client.RestHighLevelClient |
getClient()
Get the ElasticSearch transport client object
|
protected List<String> |
getIndexesForDto(Class<? extends es.prodevelop.pui9.model.dto.interfaces.IViewDto> dtoClass)
Return the list of indexes for the given Dto.
|
protected String |
getIndexForLanguage(Class<? extends es.prodevelop.pui9.model.dto.interfaces.IViewDto> dtoClass,
PuiLanguage language)
Get the index for the given
IViewDto class and language |
protected String |
getIndexPrefix()
Get the index prefix for the indexes of ElasticSearch for this application
|
protected PuiLanguage |
getLanguageFromIndex(String index)
Get the language for the given Index
|
protected boolean |
isTextTerm(Class<? extends es.prodevelop.pui9.model.dto.interfaces.IViewDto> dtoClass,
String fieldName)
Check if the given field is considered as Term for the given DTO class
|
protected static final String STRING_SEPARATOR
protected final org.apache.commons.logging.Log logger
@Autowired protected es.prodevelop.pui9.model.dao.registry.DaoRegistry daoRegistry
@Autowired protected IPuiElasticSearchEnablement puiElasticSearchEnablement
protected org.elasticsearch.client.RestHighLevelClient getClient()
throws PuiElasticSearchNoNodesException
PuiElasticSearchNoNodesException - If Elastic Search is not connected
to any Nodeprotected List<String> getIndexesForDto(Class<? extends es.prodevelop.pui9.model.dto.interfaces.IViewDto> dtoClass)
dtoClass - The IViewDto class that represents the indexprotected String getIndexForLanguage(Class<? extends es.prodevelop.pui9.model.dto.interfaces.IViewDto> dtoClass, PuiLanguage language)
IViewDto class and languagedtoClass - The IViewDto class that represents the indexlanguage - The desired languageprotected String getIndexPrefix()
protected PuiLanguage getLanguageFromIndex(String index)
index - The index nameprotected boolean isTextTerm(Class<? extends es.prodevelop.pui9.model.dto.interfaces.IViewDto> dtoClass, String fieldName)
dtoClass - The DTO class of the fieldfieldName - The field to checkCopyright © 2020. All rights reserved.