Package org.apache.avro.data
Class TimeConversions.DateConversion
- Enclosing class:
TimeConversions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromInt
(Integer daysFromEpoch, Schema schema, LogicalType type) Return the Java class representing the logical type.Return the logical type this class converts.toInt
(LocalDate date, Schema schema, LogicalType type) Methods inherited from class org.apache.avro.Conversion
adjustAndSetValue, fromArray, fromBoolean, fromBytes, fromCharSequence, fromDouble, fromEnumSymbol, fromFixed, fromFloat, fromLong, fromMap, fromRecord, toArray, toBoolean, toBytes, toCharSequence, toDouble, toEnumSymbol, toFixed, toFloat, toLong, toMap, toRecord
-
Constructor Details
-
DateConversion
public DateConversion()
-
-
Method Details
-
getConvertedType
Description copied from class:Conversion
Return the Java class representing the logical type.- Specified by:
getConvertedType
in classConversion<LocalDate>
- Returns:
- a Java class returned by from methods and accepted by to methods
-
getLogicalTypeName
Description copied from class:Conversion
Return the logical type this class converts.- Specified by:
getLogicalTypeName
in classConversion<LocalDate>
- Returns:
- a String logical type name
-
fromInt
- Overrides:
fromInt
in classConversion<LocalDate>
-
toInt
- Overrides:
toInt
in classConversion<LocalDate>
-
getRecommendedSchema
- Overrides:
getRecommendedSchema
in classConversion<LocalDate>
-