类 DataIntegrityViolationException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.dao.DataAccessException
- org.springframework.dao.NonTransientDataAccessException
- org.springframework.dao.DataIntegrityViolationException
- 所有已实现的接口:
Serializable
- 直接已知子类:
DuplicateKeyException
public class DataIntegrityViolationException extends NonTransientDataAccessException
Exception thrown when an attempt to insert or update data results in violation of an integrity constraint. Note that this is not purely a relational concept; unique primary keys are required by most database types.- 作者:
- Rod Johnson
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 DataIntegrityViolationException(String msg)
Constructor for DataIntegrityViolationException.DataIntegrityViolationException(String msg, Throwable cause)
Constructor for DataIntegrityViolationException.
方法概要
从类继承的方法 org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
构造器详细资料
DataIntegrityViolationException
public DataIntegrityViolationException(String msg)
Constructor for DataIntegrityViolationException.- 参数:
msg
- the detail message
DataIntegrityViolationException
public DataIntegrityViolationException(String msg, Throwable cause)
Constructor for DataIntegrityViolationException.- 参数:
msg
- the detail messagecause
- the root cause from the data access API in use