|
32 | 32 | * {@link RowMapper} implementation that converts a row into a new instance
|
33 | 33 | * of the specified mapped target class. The mapped target class must be a
|
34 | 34 | * top-level class or {@code static} nested class, and it may expose either a
|
35 |
| - * data class constructor with named parameters corresponding to column names |
36 |
| - * or classic bean property setter methods with property names corresponding to |
37 |
| - * column names (or even a combination of both). |
| 35 | + * <em>data class</em> constructor with named parameters corresponding to column |
| 36 | + * names or classic bean property setter methods with property names corresponding |
| 37 | + * to column names (or even a combination of both). |
| 38 | + * |
| 39 | + * <p>The term "data class" applies to Java <em>records</em>, Kotlin <em>data |
| 40 | + * classes</em>, and any class which has a constructor with named parameters |
| 41 | + * that are intended to be mapped to corresponding column names. |
| 42 | + * |
| 43 | + * <p>When combining a data class constructor with setter methods, any property |
| 44 | + * mapped successfully via a constructor argument will not be mapped additionally |
| 45 | + * via a corresponding setter method. This means that constructor arguments take |
| 46 | + * precedence over property setter methods. |
38 | 47 | *
|
39 | 48 | * <p>Note that this class extends {@link BeanPropertyRowMapper} and can
|
40 | 49 | * therefore serve as a common choice for any mapped target class, flexibly
|
41 | 50 | * adapting to constructor style versus setter methods in the mapped class.
|
42 | 51 | *
|
| 52 | + * <p>Please note that this class is designed to provide convenience rather than |
| 53 | + * high performance. For best performance, consider using a custom {@code RowMapper} |
| 54 | + * implementation. |
| 55 | + * |
43 | 56 | * @author Juergen Hoeller
|
| 57 | + * @author Sam Brannen |
44 | 58 | * @since 5.3
|
45 | 59 | * @param <T> the result type
|
46 | 60 | */
|
|
0 commit comments