Class SqlTimeConverter

java.lang.Object
org.litebridgedb.convert.converter.SqlTimeConverter
All Implemented Interfaces:
Converter<Time>, ConverterFunction<Time>, SqlConverter<Time>

public class SqlTimeConverter extends Object implements SqlConverter<Time>
A converter for Time values.

Handles Types.TIME.

  • Constructor Details

    • SqlTimeConverter

      public SqlTimeConverter()
  • Method Details

    • convert

      public @Nullable Time convert(@Nullable Object value)
      Converts the given value to a Time.

      Supports Time, LocalTime, and string representations.

      Specified by:
      convert in interface ConverterFunction<Time>
      Parameters:
      value - the value to convert, may be null
      Returns:
      the converted Time, or null
    • type

      public Class<?> type()
      Returns the target Java class this converter handles.
      Specified by:
      type in interface Converter<Time>
      Returns:
      Time.class
    • sqlTypes

      public int[] sqlTypes()
      Returns the SQL types associated with this converter.
      Specified by:
      sqlTypes in interface SqlConverter<Time>
      Returns:
      an array containing Types.TIME