org.hibernate.exception
Interface SQLExceptionConverter
- All Known Implementing Classes:
- CacheSQLStateConverter, SQLStateConverter
public interface SQLExceptionConverter
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 |
JDBCException |
convert(java.sql.SQLException sqlException,
java.lang.String message,
java.lang.String sql)
Convert the given SQLException into Hibernate's JDBCException hierarchy. |
convert
JDBCException convert(java.sql.SQLException sqlException,
java.lang.String message,
java.lang.String sql)
- 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
Copyright © 2008 Hibernate.org. All Rights Reserved.