Class ReadableTupleMapper

java.lang.Object
io.micronaut.data.r2dbc.mapper.ReadableTupleMapper
All Implemented Interfaces:
SqlTypeMapper<io.r2dbc.spi.Readable, jakarta.persistence.Tuple>, TypeMapper<io.r2dbc.spi.Readable, jakarta.persistence.Tuple>

@Internal public final class ReadableTupleMapper extends Object implements SqlTypeMapper<io.r2dbc.spi.Readable, jakarta.persistence.Tuple>
A mapper of Tuple backed by a Readable Oracle OUT parameter set.
Since:
5.0
Author:
Radovan Radic
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReadableTupleMapper(io.micronaut.core.convert.ConversionService conversionService, Map<String,Integer> columnIndexesByName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.micronaut.core.convert.ConversionService
     
    boolean
    hasNext(io.r2dbc.spi.Readable resultSet)
    Is another result available.
    jakarta.persistence.Tuple
    map(io.r2dbc.spi.Readable readable, Class<jakarta.persistence.Tuple> type)
    Map the given result set to the given object.
    @Nullable Object
    read(io.r2dbc.spi.Readable readable, String name)
    Read a value for the given name from the given object.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface TypeMapper

    read
  • Constructor Details

    • ReadableTupleMapper

      public ReadableTupleMapper(io.micronaut.core.convert.ConversionService conversionService, Map<String,Integer> columnIndexesByName)
  • Method Details

    • hasNext

      public boolean hasNext(io.r2dbc.spi.Readable resultSet)
      Description copied from interface: SqlTypeMapper
      Is another result available.
      Specified by:
      hasNext in interface SqlTypeMapper<io.r2dbc.spi.Readable, jakarta.persistence.Tuple>
      Parameters:
      resultSet - The result set
      Returns:
      True if it is
    • map

      public jakarta.persistence.Tuple map(io.r2dbc.spi.Readable readable, Class<jakarta.persistence.Tuple> type) throws DataAccessException
      Description copied from interface: TypeMapper
      Map the given result set to the given object.
      Specified by:
      map in interface TypeMapper<io.r2dbc.spi.Readable, jakarta.persistence.Tuple>
      Parameters:
      readable - The object to map
      type - The type
      Returns:
      The mapped object
      Throws:
      DataAccessException - If the object cannot be mapped.
    • read

      public @Nullable Object read(io.r2dbc.spi.Readable readable, String name)
      Description copied from interface: TypeMapper
      Read a value for the given name from the given object.
      Specified by:
      read in interface TypeMapper<io.r2dbc.spi.Readable, jakarta.persistence.Tuple>
      Parameters:
      readable - The object to read from
      name - The name
      Returns:
      The value
    • getConversionService

      public io.micronaut.core.convert.ConversionService getConversionService()
      Specified by:
      getConversionService in interface TypeMapper<io.r2dbc.spi.Readable, jakarta.persistence.Tuple>
      Returns:
      The conversion service to use.