java.lang.Object
org.jooq.impl.DefaultRecordMapperProvider
- All Implemented Interfaces:
Serializable
,RecordMapperProvider
public class DefaultRecordMapperProvider
extends Object
implements RecordMapperProvider, Serializable
A default
RecordMapperProvider
implementation, providing a
DefaultRecordMapper
instance.- Author:
- Lukas Eder
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
DefaultRecordMapperProvider
(Configuration configuration) Create a newRecordMapperProvider
with aConfiguration
that can be used by jOOQ for caching reflection information. -
Method Summary
Modifier and TypeMethodDescriptionfinal <R extends Record,
E>
RecordMapper<R,E> provide
(RecordType<R> rowType, Class<? extends E> type) Provide aRecordMapper
instance.
-
Constructor Details
-
DefaultRecordMapperProvider
public DefaultRecordMapperProvider() -
DefaultRecordMapperProvider
Create a newRecordMapperProvider
with aConfiguration
that can be used by jOOQ for caching reflection information.
-
-
Method Details
-
provide
public final <R extends Record,E> RecordMapper<R,E> provide(RecordType<R> rowType, Class<? extends E> type) Description copied from interface:RecordMapperProvider
Provide aRecordMapper
instance.Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
A
RecordMapper
instance should be able to map any number of records with the sameRecordType
. For example, forRecord.into(Class)
,provide()
andRecordMapper.map(Record)
are called only once. ForResult.into(Class)
,provide()
is called only once, butRecordMapper.map(Record)
is called several times, once for everyRecord
in theResult
.- Specified by:
provide
in interfaceRecordMapperProvider
- Parameters:
rowType
- TheRecordType
of records that shall be mapped by the returnedRecordMapper
.type
- The user type that was passed intoRecord.into(Class)
or any other method.- Returns:
- A
RecordMapper
instance. - See Also:
-