public static class DefaultSchema.DefaultSchemaProvider extends java.lang.Object implements SchemaProvider
SchemaProvider
for default schemas. Looks up the provider annotated for a type, and
delegates to that provider.Constructor and Description |
---|
DefaultSchemaProvider() |
Modifier and Type | Method and Description |
---|---|
<T> SerializableFunction<Row,T> |
fromRowFunction(TypeDescriptor<T> typeDescriptor)
Given a type, returns a function that converts from a
Row object to that type. |
<T> @Nullable SchemaProvider |
getUnderlyingSchemaProvider(java.lang.Class<T> clazz)
Retrieves the underlying
SchemaProvider for the given Class . |
<T> @Nullable SchemaProvider |
getUnderlyingSchemaProvider(TypeDescriptor<T> typeDescriptor)
Retrieves the underlying
SchemaProvider for the given TypeDescriptor . |
<T> Schema |
schemaFor(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 a
Row object If no schema
exists, returns null. |
public <T> @Nullable SchemaProvider getUnderlyingSchemaProvider(TypeDescriptor<T> typeDescriptor)
SchemaProvider
for the given TypeDescriptor
. If no
provider is found, returns null.public <T> @Nullable SchemaProvider getUnderlyingSchemaProvider(java.lang.Class<T> clazz)
SchemaProvider
for the given Class
. If no provider
is found, returns null.public <T> Schema schemaFor(TypeDescriptor<T> typeDescriptor)
SchemaProvider
schemaFor
in interface SchemaProvider
public <T> SerializableFunction<T,Row> toRowFunction(TypeDescriptor<T> typeDescriptor)
Row
object If no schema
exists, returns null.toRowFunction
in interface SchemaProvider
public <T> SerializableFunction<Row,T> fromRowFunction(TypeDescriptor<T> typeDescriptor)
Row
object to that type. If no
schema exists, returns null.fromRowFunction
in interface SchemaProvider