public abstract class AbstractDateTimeConverter extends java.lang.Object implements AvroTypeConverter
AvroTypeConverter.Incompatible| Constructor and Description |
|---|
AbstractDateTimeConverter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canManage(org.apache.avro.Schema schema,
java.util.Deque<java.lang.String> path)
used to know if this class can convert the json value to the avro value
|
java.lang.Object |
convert(org.apache.avro.Schema.Field field,
org.apache.avro.Schema schema,
java.lang.Object jsonValue,
java.util.Deque<java.lang.String> path,
boolean silently)
convert the json jsonValue to the avro jsonValue
|
protected abstract java.lang.Object |
convertDateTimeString(java.lang.String dateTimeString) |
protected abstract java.lang.Object |
convertNumber(java.lang.Number numberValue) |
protected abstract org.apache.avro.LogicalType |
getLogicalType() |
protected abstract org.apache.avro.Schema.Type |
getUnderlyingSchemaType() |
protected abstract java.lang.String |
getValidNumberFormat() |
protected abstract java.lang.String |
getValidStringFormat() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisLogicalTypepublic java.lang.Object convert(org.apache.avro.Schema.Field field,
org.apache.avro.Schema schema,
java.lang.Object jsonValue,
java.util.Deque<java.lang.String> path,
boolean silently)
AvroTypeConverterconvert in interface AvroTypeConverterfield - the field to convertschema - the schema of the fieldjsonValue - the json jsonValuepath - the path of the fieldsilently - should be false to throw an error in case of incompatible java type for the avro typepublic boolean canManage(org.apache.avro.Schema schema,
java.util.Deque<java.lang.String> path)
AvroTypeConvertercanManage in interface AvroTypeConverterschema - the avro schema in which to convert the jsonpath - the path of the current field. Can be used to define a specific converter for a pathprotected abstract java.lang.Object convertDateTimeString(java.lang.String dateTimeString)
protected abstract java.lang.Object convertNumber(java.lang.Number numberValue)
protected abstract org.apache.avro.Schema.Type getUnderlyingSchemaType()
protected abstract org.apache.avro.LogicalType getLogicalType()
protected abstract java.lang.String getValidStringFormat()
protected abstract java.lang.String getValidNumberFormat()