D
- The source type.R
- The result typepublic interface TypeMapper<D,R>
Modifier and Type | Method and Description |
---|---|
default io.micronaut.core.convert.ConversionService<?> |
getConversionService() |
R |
map(D object,
java.lang.Class<R> type)
Map the given result set to the given object.
|
default java.lang.Object |
read(D object,
io.micronaut.core.type.Argument<?> argument)
Read a value for the given name from the given object.
|
java.lang.Object |
read(D object,
java.lang.String name)
Read a value for the given name from the given object.
|
@NonNull R map(@NonNull D object, @NonNull java.lang.Class<R> type) throws DataAccessException
object
- The object to maptype
- The typeDataAccessException
- If the object cannot be mapped.@Nullable java.lang.Object read(@NonNull D object, @NonNull java.lang.String name)
object
- The object to read fromname
- The name@Nullable default java.lang.Object read(@NonNull D object, @NonNull io.micronaut.core.type.Argument<?> argument)
object
- The object to read fromargument
- The argument@NonNull default io.micronaut.core.convert.ConversionService<?> getConversionService()