T
- 結果の型 public class DataClassRowMapper<T> extends BeanPropertyRowMapper<T>
RowMapper
実装。マップされたターゲットクラスはトップレベルクラスである必要があり、列名に対応する名前付きパラメーターを持つデータクラスコンストラクター、または従来の Bean プロパティ setter(または両方の組み合わせ)を公開できます。 このクラスは BeanPropertyRowMapper
を継承するため、マップされたターゲットクラスの一般的な選択肢として機能し、マップされたクラスの setter メソッドに対してコンストラクタースタイルに柔軟に適応できることに注意してください。
logger
コンストラクターと説明 |
---|
DataClassRowMapper() Bean スタイルの構成用に新しい DataClassRowMapper を作成します。 |
DataClassRowMapper(ClassSE<T> mappedClass) 新しい DataClassRowMapper を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
protected T | constructMappedInstance(ResultSetSE rs, TypeConverter tc) 現在の行のマップされたクラスのインスタンスを作成します。 |
protected void | initialize(ClassSE<T> mappedClass) 指定されたクラスのマッピングメタデータを初期化します。 |
static <T> DataClassRowMapper<T> | newInstance(ClassSE<T> mappedClass) 新しい DataClassRowMapper を作成する静的ファクトリメソッド。 |
static <T> DataClassRowMapper<T> | newInstance(ClassSE<T> mappedClass, ConversionService conversionService) 新しい DataClassRowMapper を作成する静的ファクトリメソッド。 |
getColumnValue, getColumnValue, getConversionService, getMappedClass, initBeanWrapper, isCheckFullyPopulated, isPrimitivesDefaultedForNullValue, lowerCaseName, mapRow, setCheckFullyPopulated, setConversionService, setMappedClass, setPrimitivesDefaultedForNullValue, suppressProperty, underscoreName
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public DataClassRowMapper()
DataClassRowMapper
を作成します。protected void initialize(ClassSE<T> mappedClass)
BeanPropertyRowMapper
BeanPropertyRowMapper<T>
の initialize
mappedClass
- マッピングされたクラス protected T constructMappedInstance(ResultSetSE rs, TypeConverter tc) throws SQLExceptionSE
BeanPropertyRowMapper
BeanPropertyRowMapper<T>
の constructMappedInstance
rs
- ResultSet をマップする (現在の行に対して事前に初期化済み)tc
- この RowMapper の変換サービスを備えた TypeConverterSQLExceptionSE
- SQLException が発生した場合 public static <T> DataClassRowMapper<T> newInstance(ClassSE<T> mappedClass)
DataClassRowMapper
を作成する静的ファクトリメソッド。mappedClass
- 各行がマップされるクラス newInstance(Class, ConversionService)
public static <T> DataClassRowMapper<T> newInstance(ClassSE<T> mappedClass, @Nullable ConversionService conversionService)
DataClassRowMapper
を作成する静的ファクトリメソッド。mappedClass
- 各行がマップされるクラス conversionService
- JDBC 値を Bean プロパティにバインドする場合は ConversionService
、ない場合は null
newInstance(Class)
, BeanPropertyRowMapper.setConversionService(org.springframework.core.convert.ConversionService)