public class DefaultDatastoreEntityConverter extends Object implements DatastoreEntityConverter
| Constructor and Description |
|---|
DefaultDatastoreEntityConverter(DatastoreMappingContext mappingContext,
ObjectToKeyFactory objectToKeyFactory) |
DefaultDatastoreEntityConverter(DatastoreMappingContext mappingContext,
ReadWriteConversions conversions) |
| Modifier and Type | Method and Description |
|---|---|
ReadWriteConversions |
getConversions()
Get the
ReadWriteConversions used in this converter. |
<R> R |
read(Class<R> aClass,
com.google.cloud.datastore.BaseEntity entity) |
<T,R> Map<T,R> |
readAsMap(Class<T> keyType,
org.springframework.data.util.TypeInformation<R> componentType,
com.google.cloud.datastore.BaseEntity entity)
Read the entity as a
Map. |
void |
write(Object source,
com.google.cloud.datastore.BaseEntity.Builder sink) |
public DefaultDatastoreEntityConverter(DatastoreMappingContext mappingContext, ObjectToKeyFactory objectToKeyFactory)
public DefaultDatastoreEntityConverter(DatastoreMappingContext mappingContext, ReadWriteConversions conversions)
public ReadWriteConversions getConversions()
DatastoreEntityConverterReadWriteConversions used in this converter.getConversions in interface DatastoreEntityConverterpublic <T,R> Map<T,R> readAsMap(Class<T> keyType, org.springframework.data.util.TypeInformation<R> componentType, com.google.cloud.datastore.BaseEntity entity)
DatastoreEntityConverterMap.readAsMap in interface DatastoreEntityConverterT - the type of the key in the mapR - the type of the value in the mapkeyType - the key type of the map to be read.componentType - the value type of the map, into which each field value will be
converted.entity - the entity from Cloud Datastore.public <R> R read(Class<R> aClass, com.google.cloud.datastore.BaseEntity entity)
read in interface org.springframework.data.convert.EntityReader<Object,com.google.cloud.datastore.BaseEntity>Copyright © 2019 Pivotal Software, Inc.. All rights reserved.