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.
|
SpannerReadConverter |
getReadConverter()
Get the read converter used by this processor.
|
SpannerWriteConverter |
getWriteConverter()
Get the write converter used by this processor.
|
<T> List<T> |
mapToList(ResultSet resultSet,
Class<T> entityClass)
Converts a set of Spanner
ResultSet into a list of objects. |
<T> List<T> |
mapToList(ResultSet resultSet,
Class<T> entityClass,
Set<String> includeColumns,
boolean allowMissingColumns)
Converts a Spanner
ResultSet into a list of objects. |
<T> List<T> |
mapToList(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,
Struct source) |
<R> R |
read(Class<R> type,
Struct source,
Set<String> includeColumns,
boolean allowMissingColumns) |
convertToKey, getSpannerWriteConverter, write
<T> List<T> mapToList(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(ResultSet resultSet, Class<T> entityClass, 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 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(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.SpannerWriteConverter getWriteConverter()
SpannerReadConverter getReadConverter()
<R> R read(Class<R> type, Struct source, Set<String> includeColumns, boolean allowMissingColumns)
Copyright © 2022. All rights reserved.