public interface ReadWriteConversions
| Modifier and Type | Method and Description |
|---|---|
<T> T |
convertOnRead(Object val,
Class targetCollectionType,
Class targetComponentType)
Converts a given object to an object of a target type.
|
<T> T |
convertOnRead(Object val,
EmbeddedType embeddedType,
org.springframework.data.util.TypeInformation targetTypeInformation)
Converts a given object to an object of a target type that is possibly an embedded
entity.
|
Value |
convertOnWrite(Object obj,
DatastorePersistentProperty persistentProperty)
Converts an object to a Cloud Datastore
Value; supports collections. |
Value |
convertOnWriteSingle(Object obj)
Converts an object to a Cloud Datastore
Value, for non-collection objects. |
Optional<Class<?>> |
getDatastoreCompatibleType(Class inputType)
Get the Cloud Datastore-compatible native Java type that can be used to store the
given type.
|
void |
registerEntityConverter(DatastoreEntityConverter datastoreEntityConverter)
Registers
DatastoreEntityConverter to be used for embedded entities. |
<T> T convertOnRead(Object val, Class targetCollectionType, Class targetComponentType)
T - the type of the object that is produced by readingval - the value to converttargetCollectionType - the type of the collection to be converted into.
null if the property is a singular object.targetComponentType - the type of the property to convert. For collection-like
properties this refers to the individual items' type.<T> T convertOnRead(Object val, EmbeddedType embeddedType, org.springframework.data.util.TypeInformation targetTypeInformation)
T - the type of the object that is produced by readingval - the value to convert.embeddedType - contains the type of embedded entity conversion should produce.targetTypeInformation - type metadata information for the desired type.Value convertOnWrite(Object obj, DatastorePersistentProperty persistentProperty)
Value; supports collections.obj - the objects to convert.persistentProperty - the source field information.Value convertOnWriteSingle(Object obj)
Value, for non-collection objects.obj - the object to convert.Optional<Class<?>> getDatastoreCompatibleType(Class inputType)
inputType - the given type to test.void registerEntityConverter(DatastoreEntityConverter datastoreEntityConverter)
DatastoreEntityConverter to be used for embedded entities.datastoreEntityConverter - the DatastoreEntityConverter.Copyright © 2020 Pivotal Software, Inc.. All rights reserved.