public interface DatastoreEntityConverter extends org.springframework.data.convert.EntityReader<Object,BaseEntity>, org.springframework.data.convert.EntityWriter<Object,BaseEntity.Builder>
Modifier and Type | Method and Description |
---|---|
ReadWriteConversions |
getConversions()
Get the
ReadWriteConversions used in this converter. |
<T> DatastorePersistentEntity<T> |
getDiscriminationPersistentEntity(Class<T> entityClass,
BaseEntity<?> entity)
Provide a
DatastorePersistentEntity with support for discriminator fields. |
<T,R> Map<T,R> |
readAsMap(BaseEntity entity,
org.springframework.data.util.TypeInformation mapTypeInformation)
Read the entity as a
Map . |
<T,R> Map<T,R> |
readAsMap(Class<T> keyType,
org.springframework.data.util.TypeInformation<R> componentType,
BaseEntity entity)
Read the entity as a
Map when the map type is unknown. |
ReadWriteConversions getConversions()
ReadWriteConversions
used in this converter.<T> DatastorePersistentEntity<T> getDiscriminationPersistentEntity(Class<T> entityClass, BaseEntity<?> entity)
DatastorePersistentEntity
with support for discriminator fields.T
- the type of the entityentityClass
- the entity classentity
- the Datastore entityDatastorePersistentEntity
for the entity type with support for discriminator
fields.<T,R> Map<T,R> readAsMap(BaseEntity entity, org.springframework.data.util.TypeInformation mapTypeInformation)
Map
.T
- the type of the key in the mapR
- the type of the value in the mapentity
- the entity from Cloud Datastore.mapTypeInformation
- the actual type of the map<T,R> Map<T,R> readAsMap(Class<T> keyType, org.springframework.data.util.TypeInformation<R> componentType, BaseEntity entity)
Map
when the map type is unknown.T
- 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.Copyright © 2022. All rights reserved.