Annotation Interface Jdbc.RowMapper

Enclosing class:
Jdbc

@Target(METHOD) @Retention(CLASS) public static @interface Jdbc.RowMapper
Selects an application row mapper for query or generated key rows.

With a mapper class, generated code injects that exact service type. Without an explicit mapper class, generated code requires a row mapper service whose generic result type exactly matches the repository result type. When this annotation is absent for a query or generated key result, supported scalar results are mapped from column one, and supported records use generated component mapping.

A mapper used by a singleton repository must be stateless or safe for concurrent use. The mapper receives a scoped JdbcClient.Row and never owns JDBC resources.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the mapper service type.
  • Element Details

    • value

      Class<? extends JdbcClient.RowMapper> value
      Returns the mapper service type.
      Returns:
      service type, or the raw JdbcClient.RowMapper contract to select by generic result type
      Default:
      io.helidon.data.jdbc.JdbcClient.RowMapper.class