パッケージ 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
データを挿入または更新しようとした結果、整合性制約に違反した場合にスローされる例外。これは純粋にリレーショナルな概念ではないことに注意してください。一意の主キーなどの整合性制約は、ほとんどのデータベース型で必要です。
より具体的な例外のスーパークラスとして機能します。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 の根本原因