Package org.hibernate.exception
Class 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
-
- All Implemented Interfaces:
java.io.Serializable
public class ConstraintViolationException extends JDBCException
Implementation of JDBCException indicating that the requested DML operation resulted in a violation of a defined integrity constraint.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConstraintViolationException(java.lang.String message, java.sql.SQLException root, java.lang.String constraintName)
ConstraintViolationException(java.lang.String message, java.sql.SQLException root, java.lang.String sql, java.lang.String constraintName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getConstraintName()
Returns the name of the violated constraint, if known.-
Methods inherited from class org.hibernate.JDBCException
getErrorCode, getSQL, getSQLException, getSQLState
-
-
-
-
Constructor Detail
-
ConstraintViolationException
public ConstraintViolationException(java.lang.String message, java.sql.SQLException root, java.lang.String constraintName)
-
ConstraintViolationException
public ConstraintViolationException(java.lang.String message, java.sql.SQLException root, java.lang.String sql, java.lang.String constraintName)
-
-