public class

JDBCException

extends HibernateException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ org.hibernate.HibernateException
           ↳ org.hibernate.JDBCException
Known Direct Subclasses

Class Overview

Wraps an SQLException. Indicates that an exception occurred during a JDBC call.

See Also

Summary

Public Constructors
JDBCException(String string, SQLException root)
JDBCException(String string, SQLException root, String sql)
Public Methods
int getErrorCode()
Get the errorCode of the underlying SQLException.
String getSQL()
Get the actual SQL statement that caused the exception (may be null)
SQLException getSQLException()
Get the underlying SQLException.
String getSQLState()
Get the SQLState of the underlying SQLException.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public JDBCException (String string, SQLException root)

public JDBCException (String string, SQLException root, String sql)

Public Methods

public int getErrorCode ()

Get the errorCode of the underlying SQLException.

Returns
  • int the error code
See Also

public String getSQL ()

Get the actual SQL statement that caused the exception (may be null)

public SQLException getSQLException ()

Get the underlying SQLException.

Returns
  • SQLException

public String getSQLState ()

Get the SQLState of the underlying SQLException.

Returns
  • String
See Also