Package org.hibernate.exception.spi
Interface SQLExceptionConverter
-
- All Superinterfaces:
java.io.Serializable
public interface SQLExceptionConverter extends java.io.Serializable
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 aViolatedConstraintNameExtracter
parameter. Implementations may implementConfigurable
if they need to perform configuration steps prior to first use.- See Also:
SQLExceptionConverterFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JDBCException
convert(java.sql.SQLException sqlException, java.lang.String message, java.lang.String sql)
Convert the given SQLException into the HibernateJDBCException
hierarchy.
-
-
-
Method Detail
-
convert
JDBCException convert(java.sql.SQLException sqlException, java.lang.String message, java.lang.String sql)
Convert the given SQLException into the HibernateJDBCException
hierarchy.- Parameters:
sqlException
- The SQLException to be converted.message
- An optional error message.- Returns:
- The resulting JDBCException.
- See Also:
, JDBCConnectionException, SQLGrammarException, LockAcquisitionException
-
-