站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

JDBCException (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate
Class JDBCException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bynet.sf.hibernate.exception.NestableException
              extended bynet.sf.hibernate.HibernateException
                  extended bynet.sf.hibernate.JDBCException
All Implemented Interfaces:
Nestable, Serializable
Direct Known Subclasses:
ConstraintViolationException, 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

Field Summary
 
Fields inherited from class net.sf.hibernate.exception.NestableException
delegate
 
Constructor Summary
JDBCException(SQLException root)
          Constructor for JDBCException.
JDBCException(String message, SQLException root)
          Constructor for JDBCException.
 
Method Summary
 int getErrorCode()
          Get the errorCode of the underlying SQLException.
 SQLException getSQLException()
          Get the underlying SQLException.
 String getSQLState()
          Get the SQLState of the underlying SQLException.
 
Methods inherited from class net.sf.hibernate.exception.NestableException
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
 

Constructor Detail

JDBCException

public JDBCException(SQLException root)
Constructor for JDBCException.

Parameters:
root - The underlying exception.

JDBCException

public JDBCException(String message,
                     SQLException root)
Constructor for JDBCException.

Parameters:
message - Optional message.
root - The underlying exception.
Method Detail

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