クラス SqlCharacterValue
java.lang.ObjectSE
org.springframework.jdbc.core.support.SqlCharacterValue
- 実装されたすべてのインターフェース:
SqlTypeValue
SQL ステートメントの文字ベースのパラメーター値を表すオブジェクト。CLOB/NCLOB または LONGVARCHAR 列の文字ストリーム。
JdbcTemplate
および JdbcClient
で使用するように設計されており、ターゲットコンテンツ値をラップするパラメーター値として渡されます。SqlParameterValue
と組み合わせて SQL 型を指定できます。new SqlParameterValue(Types.CLOB, new SqlCharacterValue(myContent))
。ほとんどのデータベースドライバーでは、型 ヒントは実際には必要ありません。
- 導入:
- 6.1.4
- 作成者:
- Juergen Hoeller
- 関連事項:
フィールドサマリー
インターフェース org.springframework.jdbc.core.SqlTypeValue から継承されたフィールド
TYPE_UNKNOWN
コンストラクターのサマリー
コンストラクター説明SqlCharacterValue
(char[] characters) 指定されたコンテンツに対して新しいSqlCharacterValue
を作成します。SqlCharacterValue
(InputStreamSE asciiStream, long length) 指定されたコンテンツに対して新しいSqlCharacterValue
を作成します。SqlCharacterValue
(ReaderSE reader, long length) 指定されたコンテンツに対して新しいSqlCharacterValue
を作成します。SqlCharacterValue
(CharSequenceSE string) 指定されたコンテンツ文字列で新しい CLOB 値を作成します。メソッドのサマリー
修飾子と型メソッド説明void
setTypeValue
(PreparedStatementSE ps, int paramIndex, int sqlType, StringSE typeName) 指定された PreparedStatement に型値を設定します。
コンストラクターの詳細
SqlCharacterValue
指定されたコンテンツ文字列で新しい CLOB 値を作成します。- パラメーター:
string
- 文字列またはその他の CharSequence としてのコンテンツ
SqlCharacterValue
public SqlCharacterValue(char[] characters) 指定されたコンテンツに対して新しいSqlCharacterValue
を作成します。- パラメーター:
characters
- 文字配列としての内容
SqlCharacterValue
指定されたコンテンツに対して新しいSqlCharacterValue
を作成します。- パラメーター:
reader
- コンテンツリーダーlength
- コンテンツの長さ
SqlCharacterValue
指定されたコンテンツに対して新しいSqlCharacterValue
を作成します。- パラメーター:
asciiStream
- ASCII ストリームとしてのコンテンツlength
- コンテンツの長さ
メソッドの詳細
setTypeValue
public void setTypeValue(PreparedStatementSE ps, int paramIndex, int sqlType, @Nullable StringSE typeName) throws SQLExceptionSE インターフェースからコピーされた説明:SqlTypeValue
指定された PreparedStatement に型値を設定します。- 次で指定:
- インターフェース
SqlTypeValue
のsetTypeValue
- パラメーター:
ps
- PreparedStatement に取り組むparamIndex
- 値を設定する必要があるパラメーターのインデックスsqlType
- 設定するパラメーターの SQL 型typeName
- パラメーターの型名 (オプション)- 例外:
SQLExceptionSE
- パラメーター値の設定中に SQLException が発生した場合- 関連事項: