Module org.jooq
Package org.jooq.impl

Class DelegatingConverter<T,U>

All Implemented Interfaces:
Serializable, ContextConverter<T,U>, Converter<T,U>

public class DelegatingConverter<T,U> extends AbstractContextConverter<T,U>
Author:
Lukas Eder
See Also:
  • Constructor Details

  • Method Details

    • fromSupported

      public final boolean fromSupported()
      Description copied from interface: Converter
      Whether this is a write only converter.

      A write only converter implements only Converter.to(Object) but not Converter.from(Object).

    • toSupported

      public final boolean toSupported()
      Description copied from interface: Converter
      Whether this is a read only converter.

      A read only converter implements only Converter.from(Object) but not Converter.to(Object).

    • from

      public final U 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.

      Parameters:
      t - The database object.
      scope - The context of this conversion.
      Returns:
      The user object.
    • from

      public final U from(T t)
      Description copied from interface: Converter
      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.

      Parameters:
      t - The database object.
      Returns:
      The user object.
    • to

      public final T to(U u, 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.

      Parameters:
      u - The user object.
      scope - The context of this conversion.
      Returns:
      The database object.
    • to

      public final T to(U u)
      Description copied from interface: Converter
      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.

      Parameters:
      u - The user object.
      Returns:
      The database object.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractContextConverter<T,U>