org.apache.avro.data

## Class TimeConversions.TimeMicrosConversion

- java.lang.Object
- - org.apache.avro.Conversion<LocalTime>
  - - org.apache.avro.data.TimeConversions.TimeMicrosConversion

- Enclosing class:
    TimeConversions

      public static class TimeConversions.TimeMicrosConversion
      extends Conversion<LocalTime>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimeMicrosConversion()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `adjustAndSetValue(String varName, String valParamName)` Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted.
    `LocalTime` | `fromLong(Long microsFromMidnight, Schema schema, LogicalType type)`
    `Class<LocalTime>` | `getConvertedType()` Return the Java class representing the logical type.
    `String` | `getLogicalTypeName()` Return the logical type this class converts.
    `Schema` | `getRecommendedSchema()`
    `Long` | `toLong(LocalTime time, Schema schema, LogicalType type)`

    - ### Methods inherited from class org.apache.avro.Conversion

      `fromArray, fromBoolean, fromBytes, fromCharSequence, fromDouble, fromEnumSymbol, fromFixed, fromFloat, fromInt, fromMap, fromRecord, toArray, toBoolean, toBytes, toCharSequence, toDouble, toEnumSymbol, toFixed, toFloat, toInt, toMap, toRecord`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TimeMicrosConversion

          public TimeMicrosConversion()

  - ### Method Detail

    - #### getConvertedType

          public Class<LocalTime> getConvertedType()

      Description copied from class: `Conversion`
      Return the Java class representing the logical type.
      Specified by:
        `getConvertedType` in class `Conversion<LocalTime>`
      Returns:
        a Java class returned by from methods and accepted by to methods

    - #### getLogicalTypeName

          public String getLogicalTypeName()

      Description copied from class: `Conversion`
      Return the logical type this class converts.
      Specified by:
        `getLogicalTypeName` in class `Conversion<LocalTime>`
      Returns:
        a String logical type name

    - #### adjustAndSetValue

          public String adjustAndSetValue(String varName,
                                          String valParamName)

      Description copied from class: `Conversion`
      Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted. This method allows the Conversion to generate custom setter code if required.
      Overrides:
        `adjustAndSetValue` in class `Conversion<LocalTime>`
      Parameters:
        `varName` - the name of the variable holding the converted value
        `valParamName` - the name of the parameter with the new converted value
      Returns:
        a String for the body of the setter method

    - #### fromLong

          public LocalTime fromLong(Long microsFromMidnight,
                                    Schema schema,
                                    LogicalType type)

      Overrides:
        `fromLong` in class `Conversion<LocalTime>`

    - #### toLong

          public Long toLong(LocalTime time,
                             Schema schema,
                             LogicalType type)

      Overrides:
        `toLong` in class `Conversion<LocalTime>`

    - #### getRecommendedSchema

          public Schema getRecommendedSchema()

      Overrides:
        `getRecommendedSchema` in class `Conversion<LocalTime>`

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.