- java.lang.Object
-
- org.jooq.impl.DefaultRecordMapperProvider
-
- All Implemented Interfaces:
Serializable
,RecordMapperProvider
public class DefaultRecordMapperProvider extends Object implements RecordMapperProvider, Serializable
A defaultRecordMapperProvider
implementation, providing aDefaultRecordMapper
instance.- Author:
- Lukas Eder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description DefaultRecordMapperProvider()
protected
DefaultRecordMapperProvider(Configuration configuration)
Create a newRecordMapperProvider
with aConfiguration
that can be used by jOOQ for caching reflection information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R extends Record,E>
RecordMapper<R,E>provide(RecordType<R> rowType, Class<? extends E> type)
Provide aRecordMapper
instance.
-
-
-
Constructor Detail
-
DefaultRecordMapperProvider
public DefaultRecordMapperProvider()
-
DefaultRecordMapperProvider
protected DefaultRecordMapperProvider(Configuration configuration)
Create a newRecordMapperProvider
with aConfiguration
that can be used by jOOQ for caching reflection information.
-
-
Method Detail
-
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:
RecordMapper
,DefaultRecordMapper
,DefaultRecordMapperProvider
-
-