Package org.hibernate
Class JDBCException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.hibernate.HibernateException
org.hibernate.JDBCException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConstraintViolationException,DataException,GenericJDBCException,JDBCConnectionException,LockAcquisitionException,PessimisticLockException,QueryTimeoutException,SQLGrammarException
Wraps an SQLException. Indicates that an exception
occurred during a JDBC call.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJDBCException(String string, SQLException root) JDBCException(String string, SQLException root, String sql) -
Method Summary
Modifier and TypeMethodDescriptionintGet the errorCode of the underlying SQLException.getSQL()Get the actual SQL statement that caused the exception (may be null)Get the underlying SQLException.Get the SQLState of the underlying SQLException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
JDBCException
-
JDBCException
-
-
Method Details
-
getSQLState
Get the SQLState of the underlying SQLException.- Returns:
- String
- See Also:
-
getErrorCode
public int getErrorCode()Get the errorCode of the underlying SQLException.- Returns:
- int the error code
- See Also:
-
getSQLException
Get the underlying SQLException.- Returns:
- SQLException
-
getSQL
Get the actual SQL statement that caused the exception (may be null)
-