public class DefaultEntityMapper extends Object implements EntityMapper
ObjectMapper.| Constructor and Description |
|---|
DefaultEntityMapper(MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> context)
Creates a new
DefaultEntityMapper using the given MappingContext. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
mapObject(Object source)
Map the given source to
Map. |
<T> T |
mapToObject(String source,
Class<T> clazz) |
String |
mapToString(Object object) |
<T> T |
readObject(Map<String,Object> source,
Class<T> targetType)
Map the given
Map into an instance of the targetType. |
public DefaultEntityMapper(MappingContext<? extends ElasticsearchPersistentEntity<?>,ElasticsearchPersistentProperty> context)
DefaultEntityMapper using the given MappingContext.context - must not be null.public String mapToString(Object object) throws IOException
mapToString in interface EntityMapperIOExceptionpublic Map<String,Object> mapObject(Object source)
EntityMapperMap.mapObject in interface EntityMappersource - must not be null.public <T> T mapToObject(String source, Class<T> clazz) throws IOException
mapToObject in interface EntityMapperIOExceptionpublic <T> T readObject(Map<String,Object> source, Class<T> targetType)
EntityMapperMap into an instance of the targetType.readObject in interface EntityMappersource - must not be null.targetType - must not be null.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.