public class MappingElasticsearchConverter extends Object implements ElasticsearchConverter, ApplicationContextAware, InitializingBean
EntityConverter implementation based on domain type
metadata.| Constructor and Description |
|---|
MappingElasticsearchConverter(MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> mappingContext) |
MappingElasticsearchConverter(MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> mappingContext,
GenericConversionService conversionService) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
ConversionService |
getConversionService() |
MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> |
getMappingContext() |
ElasticsearchTypeMapper |
getTypeMapper() |
<R> R |
read(Class<R> type,
Document source) |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setConversions(CustomConversions conversions)
Set the
CustomConversions to be applied during the mapping process. |
void |
updateQuery(Query query,
Class<?> domainClass)
Updates a
Query by renaming the property names in the query to the correct mapped field names and the
values to the converted values if the ElasticsearchPersistentProperty for a property has a
PropertyValueConverter. |
void |
write(Object source,
Document sink) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertId, getProjectionFactory, mapObjectpublic MappingElasticsearchConverter(MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> mappingContext)
public MappingElasticsearchConverter(MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> mappingContext, @Nullable GenericConversionService conversionService)
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> getMappingContext()
getMappingContext in interface EntityConverter<ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty,Object,Document>public ConversionService getConversionService()
getConversionService in interface EntityConverter<ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty,Object,Document>public void setConversions(CustomConversions conversions)
CustomConversions to be applied during the mapping process. bean initialization.conversions - must not be null.public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic ElasticsearchTypeMapper getTypeMapper()
public <R> R read(Class<R> type, Document source)
read in interface EntityReader<Object,Document>public void write(Object source, Document sink)
write in interface EntityWriter<Object,Document>public void updateQuery(Query query, @Nullable Class<?> domainClass)
ElasticsearchConverterQuery by renaming the property names in the query to the correct mapped field names and the
values to the converted values if the ElasticsearchPersistentProperty for a property has a
PropertyValueConverter. If domainClass is null it's a noop.updateQuery in interface ElasticsearchConverterquery - the query that is internally updated, must not be nulldomainClass - the class of the object that is searched with the queryCopyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.