Module org.jooq
Package org.jooq.impl

Class JPAConverter<T,​U>

  • All Implemented Interfaces:
    Serializable, Converter<T,​U>

    public final class JPAConverter<T,​U>
    extends AbstractConverter<T,​U>
    A converter that delegates data type conversions to a JPA AttributeConverter.

    This is particularly useful when generating code from a JPADatabase, which reverse engineers JPA annotated entities, in case of which, by default, the AttributeConverter annotations are discovered automatically and the user-defined type is applied also in the jOOQ meta model.

    Lukas Eder
    See Also:
    Serialized Form
    • Constructor Detail

      • JPAConverter

        public JPAConverter​(Class<? extends javax.persistence.AttributeConverter<U,​T>> klass)
    • Method Detail

      • from

        public final U from​(T t)
        Description copied from interface: Converter
        Convert a database object to a user object
        t - The database object
        The user object
      • to

        public final T to​(U u)
        Description copied from interface: Converter
        Convert a user object to a database object
        u - The user object
        The database object