Top Description Fields Constructors Methods
org.hibernate

public Class JDBCException

extends HibernateException
Class Inheritance
Known Direct Subclasses
org.hibernate.PessimisticLockException, org.hibernate.QueryTimeoutException, org.hibernate.exception.ConstraintViolationException, org.hibernate.exception.DataException, org.hibernate.exception.GenericJDBCException, org.hibernate.exception.JDBCConnectionException, org.hibernate.exception.LockAcquisitionException, org.hibernate.exception.SQLGrammarException
Imports
java.sql.SQLException

Wraps an SQLException. Indicates that an exception occurred during a JDBC call.
Author
Gavin King
See Also
java.sql.SQLException

Field Summary

Modifier and TypeField and Description
private String
private SQLException

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

int the error code
getErrorCode
()

Get the errorCode of the underlying SQLException.

public String
getSQL()

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

public SQLException

Returns:

SQLException
getSQLException
()

Get the underlying SQLException.

public String

Returns:

String
getSQLState
()

Get the SQLState of the underlying SQLException.

Field Detail

sqlback to summary
private String sql
sqleback to summary
private SQLException sqle

Constructor Detail

JDBCExceptionback to summary
public JDBCException(String string, SQLException root)
JDBCExceptionback to summary
public JDBCException(String string, SQLException root, String sql)

Method Detail

getErrorCodeback to summary
public int getErrorCode()

Get the errorCode of the underlying SQLException.

Returns:int

int the error code

See Also
java.sql.SQLException
getSQLback to summary
public String getSQL()

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

getSQLExceptionback to summary
public SQLException getSQLException()

Get the underlying SQLException.

Returns:SQLException

SQLException

getSQLStateback to summary
public String getSQLState()

Get the SQLState of the underlying SQLException.

Returns:String

String

See Also
java.sql.SQLException