Class JdbcTupleMapper

java.lang.Object
io.micronaut.data.jdbc.mapper.JdbcTupleMapper
All Implemented Interfaces:
SqlTypeMapper<ResultSet,jakarta.persistence.Tuple>, TypeMapper<ResultSet,jakarta.persistence.Tuple>

@Internal public final class JdbcTupleMapper extends Object implements SqlTypeMapper<ResultSet,jakarta.persistence.Tuple>
A mapper of Tuple.
Since:
4.10
Author:
Denis Stepanov
  • Constructor Details

    • JdbcTupleMapper

      public JdbcTupleMapper(io.micronaut.core.convert.ConversionService conversionService)
  • Method Details

    • hasNext

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

      public jakarta.persistence.Tuple map(ResultSet rs, 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<ResultSet,jakarta.persistence.Tuple>
      Parameters:
      rs - The object to map
      type - The type
      Returns:
      The mapped object
      Throws:
      DataAccessException - If the object cannot be mapped.
    • read

      public Object read(ResultSet object, String name)
      Description copied from interface: TypeMapper
      Read a value for the given name from the given object.
      Specified by:
      read in interface TypeMapper<ResultSet,jakarta.persistence.Tuple>
      Parameters:
      object - 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<ResultSet,jakarta.persistence.Tuple>
      Returns:
      The conversion service to use.