Interface ElasticsearchConverter
- All Superinterfaces:
EntityConverter<ElasticsearchPersistentEntity<?>,
,ElasticsearchPersistentProperty, Object, Document> EntityReader<Object,
,Document> EntityWriter<Object,
Document>
- All Known Implementing Classes:
MappingElasticsearchConverter
public interface ElasticsearchConverter
extends EntityConverter<ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty,Object,Document>
- Author:
- Rizwan Idrees, Mohsin Husen, Christoph Strobl, Peter-Josef Meisch, Sasch Woo, Roman Puchkovskiy
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
Convert a given idValue to itsString
representation taking potentially registeredConverters
into account.default ProjectionFactory
Get the configuredProjectionFactory
.default Document
Map an object to aDocument
.void
updateQuery
(Query query, Class<?> domainClass) Updates aQuery
by renaming the property names in the query to the correct mapped field names and the values to the converted values if theElasticsearchPersistentProperty
for a property has aPropertyValueConverter
.Methods inherited from interface org.springframework.data.convert.EntityConverter
getConversionService, getMappingContext
Methods inherited from interface org.springframework.data.convert.EntityReader
read
Methods inherited from interface org.springframework.data.convert.EntityWriter
write
-
Method Details
-
getProjectionFactory
Get the configuredProjectionFactory
.
NOTE Should be overwritten in implementation to make use of the type cache.- Since:
- 3.2
-
convertId
Convert a given idValue to itsString
representation taking potentially registeredConverters
into account.- Parameters:
idValue
- must not be null.- Returns:
- never null.
- Since:
- 3.2
-
mapObject
Map an object to aDocument
.- Parameters:
source
- the object to map- Returns:
- will not be null.
-
updateQuery
Updates aQuery
by renaming the property names in the query to the correct mapped field names and the values to the converted values if theElasticsearchPersistentProperty
for a property has aPropertyValueConverter
. If domainClass is null it's a noop.- Parameters:
query
- the query that is internally updated, must not be nulldomainClass
- the class of the object that is searched with the query
-