- All Known Implementing Classes:
DefaultRecordUnmapperProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A provider for
RecordUnmapper
instances.
In order to inject custom POJO
to Record
mapping
behaviour, users can supply a custom RecordUnmapperProvider
to their
Configuration
instances. This provider will be used in any of these
methods (non-exhaustive list):
Record
Record.from(Object)
Record.from(Object, Field...)
Record.from(Object, int...)
Record.from(Object, Name...)
Record.from(Object, String...)
DSLContext
While not strictly required, it is advisable to implement a
RecordUnmapperProvider
whose behaviour is consistent with the
configured RecordMapperProvider
.
- Author:
- Lukas Eder
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<E,
R extends Record>
@NotNull RecordUnmapper<E, R> provide
(Class<? extends E> type, RecordType<R> recordType) Provide aRecordUnmapper
instance.
-
Method Details
-
provide
@NotNull <E,R extends Record> @NotNull RecordUnmapper<E,R> provide(Class<? extends E> type, RecordType<R> recordType) Provide aRecordUnmapper
instance.Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
- Parameters:
type
- The user type that was passed intoRecord.from(Object)
or any other method.recordType
- TheRecordType
of records that shall be mapped by the returnedRecordUnmapper
.- Returns:
- A
RecordUnmapper
instance. - See Also:
-