Package org.hibernate.exception.spi
Interface SQLExceptionConverter
-
- All Superinterfaces:
java.io.Serializable
public interface SQLExceptionConverter extends java.io.SerializableDefines 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 aViolatedConstraintNameExtracterparameter. Implementations may implementConfigurableif 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 JDBCExceptionconvert(java.sql.SQLException sqlException, java.lang.String message, java.lang.String sql)Convert the given SQLException into the HibernateJDBCExceptionhierarchy.
-
-
-
Method Detail
-
convert
JDBCException convert(java.sql.SQLException sqlException, java.lang.String message, java.lang.String sql)
Convert the given SQLException into the HibernateJDBCExceptionhierarchy.- Parameters:
sqlException- The SQLException to be converted.message- An optional error message.- Returns:
- The resulting JDBCException.
- See Also:
, JDBCConnectionException, SQLGrammarException, LockAcquisitionException
-
-