Top Description Fields Constructors Methods
org.hibernate.exception

public Class ConstraintViolationException

extends JDBCException
Class Inheritance
Imports
org.hibernate.JDBCException, java.sql.SQLException

Implementation of JDBCException indicating that the requested DML operation resulted in a violation of a defined integrity constraint.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private String

Constructor Summary

AccessConstructor and Description
public
ConstraintViolationException(String message, SQLException root, String constraintName)

public
ConstraintViolationException(String message, SQLException root, String sql, String constraintName)

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The name of the violated constraint, or null if not known.
getConstraintName
()

Returns the name of the violated constraint, if known.

Inherited from org.hibernate.JDBCException:
getErrorCodegetSQLgetSQLExceptiongetSQLState

Field Detail

constraintNameback to summary
private String constraintName

Constructor Detail

ConstraintViolationExceptionback to summary
public ConstraintViolationException(String message, SQLException root, String constraintName)
ConstraintViolationExceptionback to summary
public ConstraintViolationException(String message, SQLException root, String sql, String constraintName)

Method Detail

getConstraintNameback to summary
public String getConstraintName()

Returns the name of the violated constraint, if known.

Returns:String

The name of the violated constraint, or null if not known.