Interface Type<T>

Type Parameters:
T -
All Known Implementing Classes:
AbstractDateTimeType, AbstractJodaTimeDateTimeType, AbstractJSR310DateTimeType, AbstractType, ArrayType, BigDecimalAsDoubleType, BigDecimalType, BigIntegerAsLongType, BigIntegerType, BlobType, BooleanType, BytesType, ByteType, CalendarType, CharacterType, ClobType, CurrencyType, DateTimeType, DateType, DoubleType, EnumAsObjectType, EnumByNameType, EnumByOrdinalType, FloatType, InputStreamType, IntegerType, JSR310InstantType, JSR310LocalDateTimeType, JSR310LocalDateType, JSR310LocalTimeType, JSR310OffsetDateTimeType, JSR310OffsetTimeType, JSR310ZonedDateTimeType, LocalDateTimeType, LocalDateType, LocaleType, LocalTimeType, LongType, LongVarBinaryBytesType, NumericBooleanType, ObjectType, ShortType, SQLXMLType, StringAsObjectType, StringType, TimestampType, TimeType, TrueFalseType, URLType, UtilDateType, UtilUUIDType, XMLAsStringType, YesNoType

public interface Type<T>
Defines the de/serialization of a typed Java object from a ResultSet or to a PreparedStatement

getValue(ResultSet, int) is used for extraction and setValue(PreparedStatement, int, T) is used for population

Author:
tiwe
  • Method Details

    • getSQLTypes

      int[] getSQLTypes()
      Get the SQL supported SQL types
      Returns:
      sql types
    • getReturnedClass

      Class<T> getReturnedClass()
      Get the returned type
      Returns:
      returned class
    • getLiteral

      String getLiteral(T value)
      Get the literal representation
      Parameters:
      value - value
      Returns:
      literal representation
    • getValue

      @Nullable T getValue(ResultSet rs, int startIndex) throws SQLException
      Get the object from the result set
      Parameters:
      rs - result set
      startIndex - column index in result set
      Returns:
      value
      Throws:
      SQLException
    • setValue

      void setValue(PreparedStatement st, int startIndex, T value) throws SQLException
      Set the object to the statement
      Parameters:
      st - statement
      startIndex - column index in statement
      value - value to be set
      Throws:
      SQLException