public class DefaultRecordMapperProvider extends java.lang.Object implements RecordMapperProvider, java.io.Serializable
RecordMapperProvider
implementation, providing a
DefaultRecordMapper
instance.Modifier | Constructor and Description |
---|---|
|
DefaultRecordMapperProvider() |
protected |
DefaultRecordMapperProvider(Configuration configuration)
Create a new
RecordMapperProvider with a Configuration
that can be used by jOOQ for caching reflection information. |
Modifier and Type | Method and Description |
---|---|
<R extends Record,E> |
provide(RecordType<R> rowType,
java.lang.Class<? extends E> type)
Provide a
RecordMapper instance. |
public DefaultRecordMapperProvider()
protected DefaultRecordMapperProvider(Configuration configuration)
RecordMapperProvider
with a Configuration
that can be used by jOOQ for caching reflection information.public final <R extends Record,E> RecordMapper<R,E> provide(RecordType<R> rowType, java.lang.Class<? extends E> type)
RecordMapperProvider
RecordMapper
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 same RecordType
. For example, for
Record.into(Class)
, provide()
and
RecordMapper.map(Record)
are called only once. For
Result.into(Class)
, provide()
is called only once,
but RecordMapper.map(Record)
is called several times, once for
every Record
in the Result
.
provide
in interface RecordMapperProvider
rowType
- The RecordType
of records that shall be
mapped by the returned RecordMapper
.type
- The user type that was passed into Record.into(Class)
or any other method.RecordMapper
instance.RecordMapper
,
DefaultRecordMapper
,
DefaultRecordMapperProvider
Copyright © 2018. All Rights Reserved.