public abstract class SqlParameterSourceUtils extends ObjectSE
NamedParameterJdbcTemplate
で SqlParameterSource
を使用するためのヘルパーメソッドを提供するクラス。コンストラクターと説明 |
---|
SqlParameterSourceUtils() |
修飾子と型 | メソッドと説明 |
---|---|
static SqlParameterSource[] | createBatch(CollectionSE<?> candidates) 渡された値( Map SE または Bean オブジェクト)からのデータが入力された SqlParameterSource オブジェクトの配列を作成します。 |
static SqlParameterSource[] | createBatch(MapSE<StringSE,?>[] valueMaps) 渡された値からのデータが入力された MapSqlParameterSource オブジェクトの配列を作成します。 |
static SqlParameterSource[] | createBatch(ObjectSE... candidates) 渡された値( Map SE または Bean オブジェクト)からのデータが入力された SqlParameterSource オブジェクトの配列を作成します。 |
static MapSE<StringSE, StringSE> | extractCaseInsensitiveParameterNames(SqlParameterSource parameterSource) 大文字と小文字を区別しないパラメーター名と元の名前のマップを作成します。 |
static ObjectSE | getTypedValue(SqlParameterSource source, StringSE parameterName) パラメーターに型情報がある場合はラップされた値を作成し、ない場合はプレーンオブジェクトを作成します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public static SqlParameterSource[] createBatch(ObjectSE... candidates)
Map
SE または Bean オブジェクト)からのデータが入力された SqlParameterSource
オブジェクトの配列を作成します。これにより、バッチ操作に何が含まれるかが定義されます。candidates
- 使用する値を含むオブジェクトのオブジェクト配列 SqlParameterSource
の配列 MapSqlParameterSource
, BeanPropertySqlParameterSource
, NamedParameterJdbcTemplate.batchUpdate(String, SqlParameterSource[])
public static SqlParameterSource[] createBatch(CollectionSE<?> candidates)
Map
SE または Bean オブジェクト)からのデータが入力された SqlParameterSource
オブジェクトの配列を作成します。これにより、バッチ操作に何が含まれるかが定義されます。candidates
- 使用する値を含むオブジェクトのコレクション SqlParameterSource
の配列 MapSqlParameterSource
, BeanPropertySqlParameterSource
, NamedParameterJdbcTemplate.batchUpdate(String, SqlParameterSource[])
public static SqlParameterSource[] createBatch(MapSE<StringSE,?>[] valueMaps)
MapSqlParameterSource
オブジェクトの配列を作成します。これにより、バッチ操作に何が含まれるかが定義されます。valueMaps
- 使用する値を含む Map
SE インスタンスの配列 SqlParameterSource
の配列 MapSqlParameterSource
, NamedParameterJdbcTemplate.batchUpdate(String, Map[])
@Nullable public static ObjectSE getTypedValue(SqlParameterSource source, StringSE parameterName)
source
- パラメーター値と型情報のソース parameterName
- パラメーターの名前 public static MapSE<StringSE,StringSE> extractCaseInsensitiveParameterNames(SqlParameterSource parameterSource)
parameterSource
- パラメーター名のソース