Converter with alternative
from(Object, ConverterContext) and
to(Object, ConverterContext) methods.
This special converter type can be used wherever an ordinary
Converter is used. jOOQ internal call sites will call the alternative
from(Object, ConverterContext) and
to(Object, ConverterContext) methods, instead of
from(Object) and to(Object), allowing for accessing global
Configuration#data() content.
| Modifier and Type | Method and Description |
|---|---|
| public default <X> @NotNull ContextConverter | andThen(Converter<? super U, X> converter)
Overrides default org. |
| public default @NotNull ContextConverter | forArrays()
Overrides default org. |
| public U | Returns: The user object.The database object. databaseObject, ConverterContext The context of this conversion. ctx)Read and convert a database object to a user object. |
| public default U | from(T
The database object. databaseObject)Implements org. |
| public static < the database type T, the user type U> @NotNull ContextConverter | Returns: The converter.The database type fromType, Class<U> The user type toType, BiFunction<? super T, ? super ConverterContext, ? extends U> A function converting from T to U when reading from the
database. from)Construct a new read-only converter from a function. |
| public static < the database type. T, the user type. U> @NotNull Converter | Returns: The converter.The database type. fromType, Class<U> The user type. toType, BiFunction<? super T, ? super ConverterContext, ? extends U> A function converting from T to U when reading from the
database. from)Construct a new read-only converter from a function. |
| public default @NotNull ContextConverter | |
| public static < the database type. T, the user type. U> @NotNull ContextConverter | Returns: The converter.The database type. fromType, Class<U> The user type. toType, BiFunction<? super T, ? super ConverterContext, ? extends U> A function converting from T to U when reading from the
database. from, BiFunction<? super U, ? super ConverterContext, ? extends T> A function converting from U to T when writing to the database. to)Construct a new converter from functions. |
| public static < the database type T, the user type U> @NotNull ContextConverter | Returns: The converter.The database type fromType, Class<U> The user type toType, BiFunction<? super T, ? super ConverterContext, ? extends U> A function converting from T to U when reading from the
database. from, BiFunction<? super U, ? super ConverterContext, ? extends T> A function converting from U to T when writing to the database. to)Construct a new converter from functions. |
| public static <T, U> @NotNull ContextConverter | |
| public T | Returns: The database object.The user object. userObject, ConverterContext The context of this conversion. ctx)Convert and write a user object to a database object. |
| public default T | to(U
The user object. userObject)Implements org. |
| public static < the database type T, the user type U> @NotNull ContextConverter | Returns: The converter.The database type fromType, Class<U> The user type toType, BiFunction<? super U, ? super ConverterContext, ? extends T> A function converting from U to T when writing to the database. to)Construct a new write-only converter from a function. |
| public static < the database type T, the user type U> @NotNull Converter | Returns: The converter.The database type fromType, Class<U> The user type toType, BiFunction<? super U, ? super ConverterContext, ? extends T> A function converting from U to T when writing to the database. to)Construct a new write-only converter from a function. |
| andThen | back to summary |
|---|---|
| public default <X> @NotNull ContextConverter Overrides default org. Chain a converter to this converter. | |
| forArrays | back to summary |
|---|---|
| public default @NotNull ContextConverter Overrides default org. Turn this converter into a converter for arrays. | |
| from | back to summary |
|---|---|
| public U from(T databaseObject, ConverterContext ctx) Read and convert a database object to a user object.
| |
| from | back to summary |
|---|---|
| public default U from(T databaseObject) Implements org. Doc from org. Read and convert a database object to a user object.
| |
| from | back to summary |
|---|---|
| public static <T, U> @NotNull ContextConverter Construct a new read-only converter from a function.
| |
| fromNullable | back to summary |
|---|---|
| public static <T, U> @NotNull Converter Construct a new read-only converter from a function.
This works like Example:
| |
| inverse | back to summary |
|---|---|
| public default @NotNull ContextConverter Overrides default org. Inverse this converter. | |
| of | back to summary |
|---|---|
| public static <T, U> @NotNull ContextConverter Construct a new converter from functions.
| |
| ofNullable | back to summary |
|---|---|
| public static <T, U> @NotNull ContextConverter Construct a new converter from functions.
This works like Example:
| |
| scoped | back to summary |
|---|---|
| public static <T, U> @NotNull ContextConverter Turn a
| |
| to | back to summary |
|---|---|
| public T to(U userObject, ConverterContext ctx) Convert and write a user object to a database object.
| |
| to | back to summary |
|---|---|
| public default T to(U userObject) Implements org. Doc from org. Convert and write a user object to a database object.
| |
| to | back to summary |
|---|---|
| public static <T, U> @NotNull ContextConverter Construct a new write-only converter from a function.
| |
| toNullable | back to summary |
|---|---|
| public static <T, U> @NotNull Converter Construct a new write-only converter from a function.
This works like Example:
| |