# Uses of Class
org.apache.avro.LogicalType

Packages that use LogicalType
Package
Description
org.apache.avro
Avro kernel classes.
org.apache.avro.data
Interfaces and base classes shared by generic, specific and reflect.
org.apache.avro.generic
A generic representation for Avro data.

## Uses of LogicalType in org.apache.avro

Subclasses of LogicalType in org.apache.avro
Modifier and Type
Class
Description
`static class`
`LogicalTypes.BigDecimal`
`static class`
`LogicalTypes.Date`
Date represents a date without a time
`static class`
`LogicalTypes.Decimal`
Decimal represents arbitrary-precision fixed-scale decimal numbers
`static class`
`LogicalTypes.Duration`
Duration represents a duration, consisting on months, days and milliseconds
`static class`
`LogicalTypes.LocalTimestampMicros`
`static class`
`LogicalTypes.LocalTimestampMillis`
`static class`
`LogicalTypes.LocalTimestampNanos`
`static class`
`LogicalTypes.TimeMicros`
TimeMicros represents a time in microseconds without a date
`static class`
`LogicalTypes.TimeMillis`
TimeMillis represents a time in milliseconds without a date
`static class`
`LogicalTypes.TimestampMicros`
TimestampMicros represents a date and time in microseconds
`static class`
`LogicalTypes.TimestampMillis`
TimestampMillis represents a date and time in milliseconds
`static class`
`LogicalTypes.TimestampNanos`
TimestampNanos represents a date and time in nanoseconds
`static class`
`LogicalTypes.Uuid`
Uuid represents a uuid without a time
Fields in org.apache.avro declared as LogicalType
Modifier and Type
Field
Description
`final LogicalType`
Resolver.Action.`logicalType`
If the reader has a logical type, it's stored here for fast access, otherwise this will be null.
Methods in org.apache.avro that return LogicalType
Modifier and Type
Method
Description
`static LogicalType`
LogicalTypes.`duration()`
`static LogicalType`
LogicalTypes.`fromSchema(Schema schema)`
Returns the `LogicalType` from the schema, if one is present.
`LogicalType`
LogicalTypes.LogicalTypeFactory.`fromSchema(Schema schema)`
`static LogicalType`
LogicalTypes.`fromSchemaIgnoreInvalid(Schema schema)`
`LogicalType`
Schema.`getLogicalType()`
`static LogicalType`
LogicalTypes.`uuid()`
Methods in org.apache.avro with parameters of type LogicalType
Modifier and Type
Method
Description
`static Object`
Conversions.`convertToLogicalType(Object datum, Schema schema, LogicalType type, Conversion<?> conversion)`
Convert an underlying representation of a logical type (such as a ByteBuffer) to a higher level object (such as a BigDecimal).
`static <T> Object`
Conversions.`convertToRawType(Object datum, Schema schema, LogicalType type, Conversion<T> conversion)`
Convert a high level representation of a logical type (such as a BigDecimal) to its underlying representation object (such as a ByteBuffer)
`T`
Conversion.`fromArray(Collection<?> value, Schema schema, LogicalType type)`
`T`
Conversion.`fromBoolean(Boolean value, Schema schema, LogicalType type)`
`T`
Conversion.`fromBytes(ByteBuffer value, Schema schema, LogicalType type)`
`BigDecimal`
Conversions.BigDecimalConversion.`fromBytes(ByteBuffer value, Schema schema, LogicalType type)`
`BigDecimal`
Conversions.DecimalConversion.`fromBytes(ByteBuffer value, Schema schema, LogicalType type)`
`T`
Conversion.`fromCharSequence(CharSequence value, Schema schema, LogicalType type)`
`UUID`
Conversions.UUIDConversion.`fromCharSequence(CharSequence value, Schema schema, LogicalType type)`
`T`
Conversion.`fromDouble(Double value, Schema schema, LogicalType type)`
`T`
Conversion.`fromEnumSymbol(GenericEnumSymbol<?> value, Schema schema, LogicalType type)`
`T`
Conversion.`fromFixed(GenericFixed value, Schema schema, LogicalType type)`
`BigDecimal`
Conversions.DecimalConversion.`fromFixed(GenericFixed value, Schema schema, LogicalType type)`
`TimePeriod`
Conversions.DurationConversion.`fromFixed(GenericFixed value, Schema schema, LogicalType type)`
`UUID`
Conversions.UUIDConversion.`fromFixed(GenericFixed value, Schema schema, LogicalType type)`
`T`
Conversion.`fromFloat(Float value, Schema schema, LogicalType type)`
`T`
Conversion.`fromInt(Integer value, Schema schema, LogicalType type)`
`T`
Conversion.`fromLong(Long value, Schema schema, LogicalType type)`
`T`
Conversion.`fromMap(Map<?,?> value, Schema schema, LogicalType type)`
`T`
Conversion.`fromRecord(IndexedRecord value, Schema schema, LogicalType type)`
`Collection<?>`
Conversion.`toArray(T value, Schema schema, LogicalType type)`
`Boolean`
Conversion.`toBoolean(T value, Schema schema, LogicalType type)`
`ByteBuffer`
Conversion.`toBytes(T value, Schema schema, LogicalType type)`
`ByteBuffer`
Conversions.BigDecimalConversion.`toBytes(BigDecimal value, Schema schema, LogicalType type)`
`ByteBuffer`
Conversions.DecimalConversion.`toBytes(BigDecimal value, Schema schema, LogicalType type)`
`CharSequence`
Conversion.`toCharSequence(T value, Schema schema, LogicalType type)`
`CharSequence`
Conversions.UUIDConversion.`toCharSequence(UUID value, Schema schema, LogicalType type)`
`Double`
Conversion.`toDouble(T value, Schema schema, LogicalType type)`
`GenericEnumSymbol<?>`
Conversion.`toEnumSymbol(T value, Schema schema, LogicalType type)`
`GenericFixed`
Conversion.`toFixed(T value, Schema schema, LogicalType type)`
`GenericFixed`
Conversions.DecimalConversion.`toFixed(BigDecimal value, Schema schema, LogicalType type)`
`GenericFixed`
Conversions.DurationConversion.`toFixed(TimePeriod value, Schema schema, LogicalType type)`
`GenericFixed`
Conversions.UUIDConversion.`toFixed(UUID value, Schema schema, LogicalType type)`
`Float`
Conversion.`toFloat(T value, Schema schema, LogicalType type)`
`Integer`
Conversion.`toInt(T value, Schema schema, LogicalType type)`
`Long`
Conversion.`toLong(T value, Schema schema, LogicalType type)`
`Map<?,?>`
Conversion.`toMap(T value, Schema schema, LogicalType type)`
`IndexedRecord`
Conversion.`toRecord(T value, Schema schema, LogicalType type)`

## Uses of LogicalType in org.apache.avro.data

Methods in org.apache.avro.data with parameters of type LogicalType
Modifier and Type
Method
Description
`LocalDate`
TimeConversions.DateConversion.`fromInt(Integer daysFromEpoch, Schema schema, LogicalType type)`
`LocalTime`
TimeConversions.TimeMillisConversion.`fromInt(Integer millisFromMidnight, Schema schema, LogicalType type)`
`LocalDateTime`
TimeConversions.LocalTimestampMicrosConversion.`fromLong(Long microsFromEpoch, Schema schema, LogicalType type)`
`LocalDateTime`
TimeConversions.LocalTimestampMillisConversion.`fromLong(Long millisFromEpoch, Schema schema, LogicalType type)`
`LocalDateTime`
TimeConversions.LocalTimestampNanosConversion.`fromLong(Long microsFromEpoch, Schema schema, LogicalType type)`
`LocalTime`
TimeConversions.TimeMicrosConversion.`fromLong(Long microsFromMidnight, Schema schema, LogicalType type)`
`Instant`
TimeConversions.TimestampMicrosConversion.`fromLong(Long microsFromEpoch, Schema schema, LogicalType type)`
`Instant`
TimeConversions.TimestampMillisConversion.`fromLong(Long millisFromEpoch, Schema schema, LogicalType type)`
`Instant`
TimeConversions.TimestampNanosConversion.`fromLong(Long microsFromEpoch, Schema schema, LogicalType type)`
`Integer`
TimeConversions.DateConversion.`toInt(LocalDate date, Schema schema, LogicalType type)`
`Integer`
TimeConversions.TimeMillisConversion.`toInt(LocalTime time, Schema schema, LogicalType type)`
`Long`
TimeConversions.LocalTimestampMicrosConversion.`toLong(LocalDateTime timestamp, Schema schema, LogicalType type)`
`Long`
TimeConversions.LocalTimestampMillisConversion.`toLong(LocalDateTime timestamp, Schema schema, LogicalType type)`
`Long`
TimeConversions.LocalTimestampNanosConversion.`toLong(LocalDateTime timestamp, Schema schema, LogicalType type)`
`Long`
TimeConversions.TimeMicrosConversion.`toLong(LocalTime time, Schema schema, LogicalType type)`
`Long`
TimeConversions.TimestampMicrosConversion.`toLong(Instant instant, Schema schema, LogicalType type)`
`Long`
TimeConversions.TimestampMillisConversion.`toLong(Instant timestamp, Schema schema, LogicalType type)`
`Long`
TimeConversions.TimestampNanosConversion.`toLong(Instant instant, Schema schema, LogicalType type)`

## Uses of LogicalType in org.apache.avro.generic

Methods in org.apache.avro.generic with parameters of type LogicalType
Modifier and Type
Method
Description
`protected Object`
GenericDatumReader.`convert(Object datum, Schema schema, LogicalType type, Conversion<?> conversion)`
Convert an underlying representation of a logical type (such as a ByteBuffer) to a higher level object (such as a BigDecimal).
`protected <T> Object`
GenericDatumWriter.`convert(Schema schema, LogicalType logicalType, Conversion<T> conversion, Object datum)`
Convert a high level representation of a logical type (such as a BigDecimal) to its underlying representation object (such as a ByteBuffer).
`<T> Conversion<T>`
GenericData.`getConversionByClass(Class<T> datumClass, LogicalType logicalType)`
Returns the conversion for the given class and logical type.
`<T> Conversion<T>`
GenericData.`getConversionFor(LogicalType logicalType)`
Returns the Conversion for the given logical type.
`protected Object`
GenericDatumReader.`readWithConversion(Object old, Schema expected, LogicalType logicalType, Conversion<?> conversion, ResolvingDecoder in)`