1 package org.hibernate; 3 4 import java.sql.SQLException ; 5 6 7 14 public class JDBCException extends HibernateException { 15 16 private SQLException sqle; 17 private String sql; 18 19 public JDBCException(String string, SQLException root) { 20 super(string, root); 21 sqle=root; 22 } 23 24 public JDBCException(String string, SQLException root, String sql) { 25 this(string, root); 26 this.sql = sql; 27 } 28 29 34 public String getSQLState() { 35 return sqle.getSQLState(); 36 } 37 38 43 public int getErrorCode() { 44 return sqle.getErrorCode(); 45 } 46 47 51 public SQLException getSQLException() { 52 return sqle; 53 } 54 55 59 public String getSQL() { 60 return sql; 61 } 62 63 } 64 | Popular Tags |