Top Description Methods
org.hibernate.exception

public Interface SQLExceptionConverter

Known Direct Implementers
org.hibernate.exception.SQLStateConverter, org.hibernate.exception.CacheSQLStateConverter
Imports
org.hibernate.JDBCException, java.sql.SQLException

Defines a contract for implementations that know how to convert a SQLException into Hibernate's JDBCException hierarchy. Inspired by Spring's SQLExceptionTranslator.

Implementations must have a constructor which takes a ViolatedConstraintNameExtracter parameter.

Implementations may implement Configurable if they need to perform configuration steps prior to first use.

Author
Steve Ebersole
See Also
SQLExceptionConverterFactory

Method Summary

Modifier and TypeMethod and Description
public JDBCException

Returns:

The resulting JDBCException.
convert
(SQLException
The SQLException to be converted.
sqlException
,
String
An optional error message.
message
,
String sql)

Convert the given SQLException into Hibernate's JDBCException hierarchy.

Method Detail

convertback to summary
public JDBCException convert(SQLException sqlException, String message, String sql)

Convert the given SQLException into Hibernate's JDBCException hierarchy.

Parameters
sqlException:SQLException

The SQLException to be converted.

message:String

An optional error message.

Returns:JDBCException

The resulting JDBCException.

See Also
JDBCConnectionException, SQLGrammarException, LockAcquisitionException