public interface ElasticsearchConverter extends EntityConverter<ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty,Object,Document>
Modifier and Type | Method and Description |
---|---|
default String |
convertId(Object idValue)
Convert a given idValue to its
String representation taking potentially registered
Converters into account. |
default ProjectionFactory |
getProjectionFactory()
Get the configured
ProjectionFactory . |
default Document |
mapObject(Object source)
Map an object to a
Document . |
void |
updateCriteriaQuery(CriteriaQuery criteriaQuery,
Class<?> domainClass)
Updates a
CriteriaQuery 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
ElasticsearchPersistentPropertyConverter . |
default 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
ElasticsearchPersistentPropertyConverter . |
getConversionService, getMappingContext
read
write
default ProjectionFactory getProjectionFactory()
ProjectionFactory
. default String convertId(Object idValue)
String
representation taking potentially registered
Converters
into account.idValue
- must not be null.default Document mapObject(@Nullable Object source)
Document
.source
- the object to mapdefault void updateQuery(Query query, @Nullable Class<?> domainClass)
ElasticsearchPersistentProperty
for a property has a
ElasticsearchPersistentPropertyConverter
. If
domainClass is null, it's a noop; handling null here eliminates null checks in the caller.query
- the query that is internally updateddomainClass
- the class of the object that is searched with the queryvoid updateCriteriaQuery(CriteriaQuery criteriaQuery, Class<?> domainClass)
CriteriaQuery
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
ElasticsearchPersistentPropertyConverter
.criteriaQuery
- the query that is internally updateddomainClass
- the class of the object that is searched with the queryCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.