public class ConstraintViolationException extends JDBCException
Implementation of JDBCException indicating that the requested DML operation resulted in a violation of a defined integrity constraint.
Constructor and Description |
---|
ConstraintViolationException(String message,
SQLException root,
String constraintName) |
ConstraintViolationException(String message,
SQLException root,
String sql,
String constraintName) |
Modifier and Type | Method and Description |
---|---|
String |
getConstraintName()
Returns the name of the violated constraint, if known.
|
getErrorCode, getSQL, getSQLException, getSQLState
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ConstraintViolationException(String message, SQLException root, String constraintName)
public ConstraintViolationException(String message, SQLException root, String sql, String constraintName)
public String getConstraintName()
Returns the name of the violated constraint, if known.
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.