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:
- java.io.Serializable, Nestable
- 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
Constructor Summary |
JDBCException(java.lang.String string,
java.sql.SQLException root)
|
JDBCException(java.lang.String string,
java.sql.SQLException root,
java.lang.String sql)
|
Method Summary |
int |
getErrorCode()
Get the errorCode of the underlying SQLException. |
java.lang.String |
getSQL()
Get the actual SQL statement that caused the exception
(may be null) |
java.sql.SQLException |
getSQLException()
Get the underlying SQLException. |
java.lang.String |
getSQLState()
Get the SQLState of the underlying SQLException. |
Methods inherited from class org.hibernate.exception.NestableRuntimeException |
getCause, getMessage, getMessage, getMessages, getThrowable, getThrowableCount, getThrowables, indexOfThrowable, indexOfThrowable, printPartialStackTrace, printStackTrace, printStackTrace, printStackTrace |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JDBCException
public JDBCException(java.lang.String string,
java.sql.SQLException root)
JDBCException
public JDBCException(java.lang.String string,
java.sql.SQLException root,
java.lang.String sql)
getSQLState
public java.lang.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 java.sql.SQLException getSQLException()
- Get the underlying SQLException.
- Returns:
- SQLException
getSQL
public java.lang.String getSQL()
- Get the actual SQL statement that caused the exception
(may be null)
Copyright © 2008 Hibernate.org. All Rights Reserved.