Module org.jooq
Package org.jooq.impl

Class IdentityConverter<T>

java.lang.Object
org.jooq.impl.IdentityConverter<T>
All Implemented Interfaces:
Serializable, ContextConverter<T,T>, Converter<T,T>

public final class IdentityConverter<T> extends Object implements ContextConverter<T,T>
A converter that doesn't convert anything.
Author:
Lukas Eder
See Also:
  • Constructor Details

    • IdentityConverter

      public IdentityConverter(Class<T> type)
  • Method Details

    • from

      public final T from(T t, ConverterContext scope)
      Description copied from interface: ContextConverter
      Read and convert a database object to a user object.

      Implementations that don't support this conversion are expected to override Converter.fromSupported() to indicate lack of support.

      Specified by:
      from in interface ContextConverter<T,T>
      Parameters:
      t - The database object.
      scope - The context of this conversion.
      Returns:
      The user object.
    • to

      public final T to(T t, ConverterContext scope)
      Description copied from interface: ContextConverter
      Convert and write a user object to a database object.

      Implementations that don't support this conversion are expected to override Converter.toSupported() to indicate lack of support.

      Specified by:
      to in interface ContextConverter<T,T>
      Parameters:
      t - The user object.
      scope - The context of this conversion.
      Returns:
      The database object.
    • fromType

      public final Class<T> fromType()
      Description copied from interface: Converter
      The database type.
      Specified by:
      fromType in interface Converter<T,T>
    • toType

      public final Class<T> toType()
      Description copied from interface: Converter
      The user type.
      Specified by:
      toType in interface Converter<T,T>
    • toString

      public String toString()
      Overrides:
      toString in class Object