类 ConstraintViolationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.persistence.PersistenceException
-
- org.hibernate.HibernateException
-
- org.hibernate.JDBCException
-
- org.hibernate.exception.ConstraintViolationException
-
- 所有已实现的接口:
Serializable
public class ConstraintViolationException extends JDBCException
Implementation of JDBCException indicating that the requested DML operation resulted in a violation of a defined integrity constraint.- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 ConstraintViolationException(String message, SQLException root, String constraintName)ConstraintViolationException(String message, SQLException root, String sql, String constraintName)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetConstraintName()Returns the name of the violated constraint, if known.-
从类继承的方法 org.hibernate.JDBCException
getErrorCode, getSQL, getSQLException, getSQLState
-
-
-
-
构造器详细资料
-
ConstraintViolationException
public ConstraintViolationException(String message, SQLException root, String constraintName)
-
ConstraintViolationException
public ConstraintViolationException(String message, SQLException root, String sql, String constraintName)
-
-
方法详细资料
-
getConstraintName
public String getConstraintName()
Returns the name of the violated constraint, if known.- 返回:
- The name of the violated constraint, or null if not known.
-
-