java.lang.Object
org.jooq.impl.AbstractConverter<T,U>
org.jooq.impl.AbstractContextConverter<T,U>
org.jooq.impl.JPAConverter<T,U>
- All Implemented Interfaces:
Serializable
,ContextConverter<T,
,U> Converter<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.
- Author:
- Lukas Eder
- See Also:
-
Constructor Summary
ConstructorDescriptionJPAConverter
(Class<? extends jakarta.persistence.AttributeConverter<U, T>> klass) -
Method Summary
Modifier and TypeMethodDescriptionfinal U
from
(T t, ConverterContext scope) Read and convert a database object to a user object.final T
to
(U u, ConverterContext scope) Convert and write a user object to a database object.Methods inherited from class org.jooq.impl.AbstractContextConverter
toString
Methods inherited from class org.jooq.impl.AbstractConverter
fromType, toType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jooq.Converter
fromSupported, fromType, toSupported, toType
-
Constructor Details
-
JPAConverter
-
-
Method Details
-
from
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.
-
to
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.
-