public class AwsSchemaProvider extends GetterBasedSchemaProviderV2
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(TypeDescriptor<?> targetTypeDescriptor,
Schema schema)
Delegates to the
GetterBasedSchemaProvider.fieldValueGetters(Class, Schema) for backwards compatibility,
override it if you want to use the richer type signature contained in the TypeDescriptor not subject to the type erasure. |
java.util.List<FieldValueTypeInformation> |
fieldValueTypeInformations(TypeDescriptor<?> targetTypeDescriptor,
Schema schema)
Delegates to the
GetterBasedSchemaProvider.fieldValueTypeInformations(Class, Schema) for backwards
compatibility, override it if you want to use the richer type signature contained in the TypeDescriptor not subject to the type erasure. |
<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(TypeDescriptor<?> targetTypeDescriptor,
Schema schema)
Delegates to the
GetterBasedSchemaProvider.schemaTypeCreator(Class, Schema) for backwards compatibility,
override it if you want to use the richer type signature contained in the TypeDescriptor not subject to the type erasure. |
fieldValueGetters, fieldValueTypeInformations, schemaTypeCreator
equals, hashCode, toRowFunction
public <T> @Nullable Schema schemaFor(TypeDescriptor<T> type)
SchemaProvider
public java.util.List<FieldValueGetter> fieldValueGetters(TypeDescriptor<?> targetTypeDescriptor, Schema schema)
GetterBasedSchemaProvider
GetterBasedSchemaProvider.fieldValueGetters(Class, Schema)
for backwards compatibility,
override it if you want to use the richer type signature contained in the TypeDescriptor
not subject to the type erasure.fieldValueGetters
in class GetterBasedSchemaProviderV2
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(TypeDescriptor<?> targetTypeDescriptor, Schema schema)
GetterBasedSchemaProvider
GetterBasedSchemaProvider.fieldValueTypeInformations(Class, Schema)
for backwards
compatibility, override it if you want to use the richer type signature contained in the TypeDescriptor
not subject to the type erasure.fieldValueTypeInformations
in class GetterBasedSchemaProviderV2
public SchemaUserTypeCreator schemaTypeCreator(TypeDescriptor<?> targetTypeDescriptor, Schema schema)
GetterBasedSchemaProvider
GetterBasedSchemaProvider.schemaTypeCreator(Class, Schema)
for backwards compatibility,
override it if you want to use the richer type signature contained in the TypeDescriptor
not subject to the type erasure.schemaTypeCreator
in class GetterBasedSchemaProviderV2