Top Description Methods
tools.jackson.dataformat.avro.annotation

public @Interface AvroDecimal

extends Annotation
Annotations
@Target:ANNOTATION_TYPE, FIELD
@Retention:RUNTIME
Imports
java.lang.annotation.*

When generate logical types is enabled, annotation instructs the AvroSchemaGenerator to declare the annotated property's logical type as "decimal" (org.apache.avro.LogicalTypes.Decimal). By default, the Avro type is "bytes" (org.apache.avro.Schema.Type#BYTES), unless the field is also annotated with tools.jackson.dataformat.avro.annotation.AvroFixedSize, in which case the Avro type will be "fixed" (org.apache.avro.Schema.Type#FIXED).

This annotation is only used during Avro schema generation and does not affect data serialization or deserialization.

Since
2.19

Method Summary

Modifier and TypeMethod and Description
public int
precision()

Maximum precision of decimals stored in this type.

public int
scale()

Scale must be zero or a positive integer less than or equal to the precision.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

precisionback to summary
public int precision()

Maximum precision of decimals stored in this type.

scaleback to summary
public int scale()

Scale must be zero or a positive integer less than or equal to the precision.