@Experimental(value=SCHEMAS) public abstract class GetterBasedSchemaProvider extends java.lang.Object implements SchemaProvider
SchemaProvider
base class that vends schemas and rows based on FieldValueGetter
s.Constructor and Description |
---|
GetterBasedSchemaProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(@Nullable java.lang.Object obj) |
abstract java.util.List<FieldValueGetter> |
fieldValueGetters(java.lang.Class<?> targetClass,
Schema schema)
Implementing class should override to return FieldValueGetters.
|
abstract java.util.List<FieldValueTypeInformation> |
fieldValueTypeInformations(java.lang.Class<?> targetClass,
Schema schema)
Implementing class should override to return a list of type-informations.
|
<T> SerializableFunction<Row,T> |
fromRowFunction(TypeDescriptor<T> typeDescriptor)
Given a type, returns a function that converts from a
Row object to that type. |
int |
hashCode() |
abstract SchemaUserTypeCreator |
schemaTypeCreator(java.lang.Class<?> targetClass,
Schema schema)
Implementing class should override to return a constructor.
|
<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. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
schemaFor
public abstract java.util.List<FieldValueGetter> fieldValueGetters(java.lang.Class<?> targetClass, Schema schema)
public abstract java.util.List<FieldValueTypeInformation> fieldValueTypeInformations(java.lang.Class<?> targetClass, Schema schema)
public abstract SchemaUserTypeCreator schemaTypeCreator(java.lang.Class<?> targetClass, Schema schema)
public <T> SerializableFunction<T,Row> toRowFunction(TypeDescriptor<T> typeDescriptor)
SchemaProvider
Row
object If no schema
exists, returns null.toRowFunction
in interface SchemaProvider
public <T> SerializableFunction<Row,T> fromRowFunction(TypeDescriptor<T> typeDescriptor)
SchemaProvider
Row
object to that type. If no
schema exists, returns null.fromRowFunction
in interface SchemaProvider
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object