public class AwsSchemaProvider extends GetterBasedSchemaProvider
SdkPojo
models using the provided field metadata (@see SdkPojo.sdkFields()
) rather than reflection.
Note: Beam doesn't support self-referential schemas. Some AWS models are not compatible with
schemas for that reason and require a dedicated coder, such as DynamoDB AttributeValue
(coder
).
Constructor and Description |
---|
AwsSchemaProvider() |
Modifier and Type | Method and Description |
---|---|
java.util.List<FieldValueGetter> |
fieldValueGetters(java.lang.Class<?> clazz,
Schema schema)
Implementing class should override to return FieldValueGetters.
|
java.util.List<FieldValueTypeInformation> |
fieldValueTypeInformations(java.lang.Class<?> cls,
Schema schema)
Implementing class should override to return a list of type-informations.
|
<T> SerializableFunction<Row,T> |
fromRowFunction(TypeDescriptor<T> type)
Given a type, returns a function that converts from a
Row object to that type. |
<T> @Nullable Schema |
schemaFor(TypeDescriptor<T> type)
Lookup a schema for the given type.
|
SchemaUserTypeCreator |
schemaTypeCreator(java.lang.Class<?> cls,
Schema schema)
Implementing class should override to return a constructor.
|
equals, hashCode, toRowFunction
public <T> @Nullable Schema schemaFor(TypeDescriptor<T> type)
SchemaProvider
public java.util.List<FieldValueGetter> fieldValueGetters(java.lang.Class<?> clazz, Schema schema)
GetterBasedSchemaProvider
fieldValueGetters
in class GetterBasedSchemaProvider
public <T> SerializableFunction<Row,T> fromRowFunction(TypeDescriptor<T> type)
SchemaProvider
Row
object to that type. If no
schema exists, returns null.fromRowFunction
in interface SchemaProvider
fromRowFunction
in class GetterBasedSchemaProvider
public java.util.List<FieldValueTypeInformation> fieldValueTypeInformations(java.lang.Class<?> cls, Schema schema)
GetterBasedSchemaProvider
fieldValueTypeInformations
in class GetterBasedSchemaProvider
public SchemaUserTypeCreator schemaTypeCreator(java.lang.Class<?> cls, Schema schema)
GetterBasedSchemaProvider
schemaTypeCreator
in class GetterBasedSchemaProvider