public interface SQLExceptionConverter extends Serializable
Defines a contract for implementations that know how to convert a SQLException
into Hibernate’s JDBCException hierarchy. Inspired by Spring’s
SQLExceptionTranslator.
<p/>
Implementations <b>must</b> have a constructor which takes a
ViolatedConstraintNameExtracter
parameter.
<p/>
Implementations may implement Configurable
if they need to perform
configuration steps prior to first use.
SQLExceptionConverterFactory
Modifier and Type | Method and Description |
---|---|
JDBCException |
convert(SQLException sqlException,
String message,
String sql)
Convert the given SQLException into the Hibernate
JDBCException hierarchy. |
JDBCException convert(SQLException sqlException, String message, String sql)
Convert the given SQLException into the Hibernate JDBCException
hierarchy.
sqlException
- The SQLException to be converted.message
- An optional error message., JDBCConnectionException, SQLGrammarException, LockAcquisitionException
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.