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

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


net.sf.hibernate.exception
Interface SQLExceptionConverter

All Known Implementing Classes:
ErrorCodeConverter, SQLStateConverter

public interface SQLExceptionConverter

Defines a contract for implementations that know how to convert SQLExceptions 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
 JDBCException convert(SQLException sqlException, String message)
          Convert the given SQLException into Hibernate's JDBCException hierarchy.
 

Method Detail

convert

public JDBCException convert(SQLException sqlException,
                             String message)
Convert the given SQLException into Hibernate's JDBCException hierarchy.

Parameters:
sqlException - The SQLException to be converted.
message - An optional error message.
Returns:
The resulting JDBCException.
See Also:
ConstraintViolationException, JDBCConnectionException, SQLGrammarException, LockAcquisitionException