org.hibernate
Class JDBCException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.hibernate.exception.NestableRuntimeException
org.hibernate.HibernateException
org.hibernate.JDBCException
- All Implemented Interfaces:
- Nestable, Serializable
- Direct Known Subclasses:
- ConstraintViolationException, DataException, GenericJDBCException, JDBCConnectionException, LockAcquisitionException, SQLGrammarException
- public class JDBCException
- extends HibernateException
Wraps an SQLException. Indicates that an exception
occurred during a JDBC call.
- Author:
- Gavin King
- See Also:
SQLException
,
Serialized Form
Methods inherited from class org.hibernate.exception.NestableRuntimeException |
getCause, getMessage, getMessage, getMessages, getThrowable, getThrowableCount, getThrowables, indexOfThrowable, indexOfThrowable, printPartialStackTrace, printStackTrace, printStackTrace, printStackTrace |
JDBCException
public JDBCException(String string,
SQLException root)
JDBCException
public JDBCException(String string,
SQLException root,
String sql)
getSQLState
public String getSQLState()
- Get the SQLState of the underlying SQLException.
- Returns:
- String
- See Also:
SQLException
getErrorCode
public int getErrorCode()
- Get the errorCode of the underlying SQLException.
- Returns:
- int the error code
- See Also:
SQLException
getSQLException
public SQLException getSQLException()
- Get the underlying SQLException.
- Returns:
- SQLException
getSQL
public String getSQL()
- Get the actual SQL statement that caused the exception
(may be null)