1 package org.hibernate.exception; 3 4 import org.hibernate.JDBCException; 5 6 import java.sql.SQLException ; 7 8 14 public class ConstraintViolationException extends JDBCException { 15 16 private String constraintName; 17 18 public ConstraintViolationException(String message, SQLException root, String constraintName) { 19 super( message, root ); 20 this.constraintName = constraintName; 21 } 22 23 public ConstraintViolationException(String message, SQLException root, String sql, String constraintName) { 24 super( message, root, sql ); 25 this.constraintName = constraintName; 26 } 27 28 33 public String getConstraintName() { 34 return constraintName; 35 } 36 } 37 | Popular Tags |