public class ConverterAwareMappingSpannerEntityWriter extends Object implements SpannerEntityWriter
Mutation.WriteBuilder for
the purpose of creating mutations for Spanner.| Modifier and Type | Field and Description |
|---|---|
static Map<Class<?>,BiFunction<com.google.cloud.spanner.ValueBinder,?,?>> |
singleItemTypeValueBinderMethodMap
A map of types to functions that binds them to `ValueBinder` objects.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.cloud.spanner.Key |
convertToKey(Object key)
Convert a given object to a Cloud Spanner key.
|
static Class<?> |
findFirstCompatibleSpannerMultupleItemNativeType(Predicate<Class> testFunc) |
static Class<?> |
findFirstCompatibleSpannerSingleItemNativeType(Predicate<Class> testFunc) |
SpannerWriteConverter |
getSpannerWriteConverter()
Get the SpannerWriteConverter used to convert types into Cloud Spanner compatible
types.
|
void |
write(Object source,
MultipleValueBinder sink) |
void |
write(Object source,
MultipleValueBinder sink,
Set<String> includeColumns)
Writes an object's properties to the sink.
|
public static final Map<Class<?>,BiFunction<com.google.cloud.spanner.ValueBinder,?,?>> singleItemTypeValueBinderMethodMap
public static Class<?> findFirstCompatibleSpannerSingleItemNativeType(Predicate<Class> testFunc)
public static Class<?> findFirstCompatibleSpannerMultupleItemNativeType(Predicate<Class> testFunc)
public void write(Object source, MultipleValueBinder sink)
write in interface org.springframework.data.convert.EntityWriter<Object,MultipleValueBinder>public void write(Object source, MultipleValueBinder sink, Set<String> includeColumns)
write in interface SpannerEntityWritersource - the object to writesink - the sink to which to writeincludeColumns - the columns to write. If null, then all columns are written.public com.google.cloud.spanner.Key convertToKey(Object key)
SpannerEntityWriterconvertToKey in interface SpannerEntityWriterkey - the object containing the key values. This can already be a Cloud Spanner
key, a single key component, or an array of key components.public SpannerWriteConverter getSpannerWriteConverter()
SpannerEntityWritergetSpannerWriteConverter in interface SpannerEntityWriterCopyright © 2019 Pivotal Software, Inc.. All rights reserved.