Interface SpannerEntityWriter
- All Superinterfaces:
org.springframework.data.convert.EntityWriter<Object,
MultipleValueBinder>
- All Known Subinterfaces:
SpannerEntityProcessor
- All Known Implementing Classes:
ConverterAwareMappingSpannerEntityProcessor
,ConverterAwareMappingSpannerEntityWriter
public interface SpannerEntityWriter
extends org.springframework.data.convert.EntityWriter<Object,MultipleValueBinder>
An entity writer that writes values from an entity to a sink.
- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.spanner.Key
convertToKey
(Object key) Convert a given object to a Cloud Spanner key.Get the SpannerWriteConverter used to convert types into Cloud Spanner compatible types.void
write
(Object source, MultipleValueBinder sink, Set<String> includeColumns) Writes an object's properties to the sink.Methods inherited from interface org.springframework.data.convert.EntityWriter
write
-
Method Details
-
write
Writes an object's properties to the sink.- Parameters:
source
- the object to writesink
- the sink to which to writeincludeColumns
- the properties/columns to write. If null, then all columns are written.
-
convertToKey
Convert a given object to a Cloud Spanner key.- Parameters:
key
- the object containing the key values. This can already be a Cloud Spanner key, a single key component, or an array of key components.- Returns:
- the Cloud Spanner key.
-
getSpannerWriteConverter
SpannerWriteConverter getSpannerWriteConverter()Get the SpannerWriteConverter used to convert types into Cloud Spanner compatible types.- Returns:
- a SpannerWriteConverter
-