public interface SpannerEntityProcessor extends SpannerEntityWriter
| Modifier and Type | Method and Description |
|---|---|
Class |
getCorrespondingSpannerJavaType(Class originalType,
boolean isIterableInnerType)
Gets the type that will work for both read and writes with Spanner directly.
|
<T> List<T> |
mapToList(com.google.cloud.spanner.ResultSet resultSet,
Class<T> entityClass)
Converts a set of Spanner
ResultSet into a list of objects. |
<T> List<T> |
mapToList(com.google.cloud.spanner.ResultSet resultSet,
Class<T> entityClass,
Optional<Set<String>> includeColumns,
boolean allowMissingColumns)
Converts a set of Spanner
ResultSet into a list of objects. |
<T> List<T> |
mapToList(com.google.cloud.spanner.ResultSet resultSet,
Class<T> entityClass,
String... includeColumns)
Converts a set of Spanner
ResultSet into a list of objects. |
default <R> R |
read(Class<R> type,
com.google.cloud.spanner.Struct source) |
<R> R |
read(Class<R> type,
com.google.cloud.spanner.Struct source,
Set<String> includeColumns,
boolean allowMissingColumns) |
write, writeToKey<T> List<T> mapToList(com.google.cloud.spanner.ResultSet resultSet, Class<T> entityClass)
ResultSet into a list of objects.T - The type of the objects the Spanner results represent.resultSet - The Spanner results to convert. The ResultSet will be exhausted and
closed.entityClass - The type of the objects the Spanner results represent.<T> List<T> mapToList(com.google.cloud.spanner.ResultSet resultSet, Class<T> entityClass, Optional<Set<String>> includeColumns, boolean allowMissingColumns)
ResultSet into a list of objects.T - The type of the objects the Spanner results represent.resultSet - The Spanner results to convert. The ResultSet will be exhausted and
closed.entityClass - The type of the objects the Spanner results represent.includeColumns - the Set of columns to read. If the Set is not present or this
param is null then all columns will be read.allowMissingColumns - if true, then properties with no corresponding column are
not mapped. If false, then an exception is thrown.<T> List<T> mapToList(com.google.cloud.spanner.ResultSet resultSet, Class<T> entityClass, String... includeColumns)
ResultSet into a list of objects.T - The type of the objects the Spanner results represent.resultSet - The Spanner results to convert. The ResultSet will be exhausted and
closed.entityClass - The type of the objects the Spanner results represent.includeColumns - the columns to read. If none are provided then all columns are
read.Class getCorrespondingSpannerJavaType(Class originalType, boolean isIterableInnerType)
originalType - the original type that is possibly convertable by this converter.isIterableInnerType - true if the given type refers to an inner type. This is
significant because Spanner does not support the same types as singular items and as
array elements.<R> R read(Class<R> type, com.google.cloud.spanner.Struct source, Set<String> includeColumns, boolean allowMissingColumns)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.