パッケージ org.springframework.dao
クラス DataIntegrityViolationException
java.lang.ObjectSE
java.lang.ThrowableSE
java.lang.ExceptionSE
java.lang.RuntimeExceptionSE
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
org.springframework.dao.NonTransientDataAccessException
org.springframework.dao.DataIntegrityViolationException
- 実装されたすべてのインターフェース:
SerializableSE
- 既知の直属サブクラス
DuplicateKeyException
SQL ステートメントの実行が指定されたデータのマッピングに失敗したときにスローされる例外です。通常は、データの挿入や更新に限らないものの、整合性制約違反が発生します。これは純粋なリレーショナル概念ではないことに注意してください。一意の主キーなどの整合性制約は、ほとんどのデータベース型で必要です。
より具体的な例外 (例: DuplicateKeyException
) のスーパークラスとして機能します。ただし、通常は、特定の例外サブクラスに依存するのではなく、DataIntegrityViolationException
自体を処理することをお勧めします。
- 作成者:
- Rod Johnson
- 関連事項:
コンストラクターのサマリー
コンストラクター説明DataIntegrityViolationException のコンストラクター。DataIntegrityViolationException
(StringSE msg, ThrowableSE cause) DataIntegrityViolationException のコンストラクター。方法の概要
クラス org.springframework.core.NestedRuntimeException から継承されたメソッド
contains, getMostSpecificCause, getRootCause
クラス java.lang.ThrowableSE から継承されたメソッド
addSuppressedSE, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCauseSE, printStackTrace, printStackTraceSE, printStackTraceSE, setStackTraceSE, toString
コンストラクターの詳細
DataIntegrityViolationException
DataIntegrityViolationException のコンストラクター。- パラメーター:
msg
- 詳細メッセージ
DataIntegrityViolationException
DataIntegrityViolationException のコンストラクター。- パラメーター:
msg
- 詳細メッセージcause
- 使用中のデータアクセス API の根本原因