Class DefaultSchema.DefaultSchemaProvider
java.lang.Object
org.apache.beam.sdk.schemas.annotations.DefaultSchema.DefaultSchemaProvider
- All Implemented Interfaces:
Serializable,SchemaProvider
- Enclosing class:
DefaultSchema
SchemaProvider for default schemas. Looks up the provider annotated for a type, and
delegates to that provider.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> SerializableFunction<Row, T> fromRowFunction(TypeDescriptor<T> typeDescriptor) Given a type, returns a function that converts from aRowobject to that type.getUnderlyingSchemaProvider(Class<T> clazz) Retrieves the underlyingSchemaProviderfor the givenClass.getUnderlyingSchemaProvider(TypeDescriptor<T> typeDescriptor) Retrieves the underlyingSchemaProviderfor the givenTypeDescriptor.<T> SchemaschemaFor(TypeDescriptor<T> typeDescriptor) Lookup a schema for the given type.<T> SerializableFunction<T, Row> toRowFunction(TypeDescriptor<T> typeDescriptor) Given a type, return a function that converts that type to aRowobject If no schema exists, returns null.
-
Constructor Details
-
DefaultSchemaProvider
public DefaultSchemaProvider()
-
-
Method Details
-
getUnderlyingSchemaProvider
Retrieves the underlyingSchemaProviderfor the givenTypeDescriptor. If no provider is found, returns null. -
getUnderlyingSchemaProvider
Retrieves the underlyingSchemaProviderfor the givenClass. If no provider is found, returns null. -
schemaFor
Description copied from interface:SchemaProviderLookup a schema for the given type. If no schema exists, returns null.- Specified by:
schemaForin interfaceSchemaProvider
-
toRowFunction
Given a type, return a function that converts that type to aRowobject If no schema exists, returns null.- Specified by:
toRowFunctionin interfaceSchemaProvider
-
fromRowFunction
Given a type, returns a function that converts from aRowobject to that type. If no schema exists, returns null.- Specified by:
fromRowFunctionin interfaceSchemaProvider
-