Package org.hibernate.exception.internal
Class SQLExceptionTypeDelegate
- java.lang.Object
-
- org.hibernate.exception.spi.AbstractSQLExceptionConversionDelegate
-
- org.hibernate.exception.internal.SQLExceptionTypeDelegate
-
- All Implemented Interfaces:
SQLExceptionConversionDelegate
public class SQLExceptionTypeDelegate extends AbstractSQLExceptionConversionDelegate
ASQLExceptionConverter
implementation that does conversion based on theSQLException
subtype hierarchy defined by JDBC 4.
-
-
Constructor Summary
Constructors Constructor Description SQLExceptionTypeDelegate(ConversionContext conversionContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JDBCException
convert(SQLException sqlException, String message, String sql)
Convert the givenSQLException
to a subtype ofJDBCException
, if possible.-
Methods inherited from class org.hibernate.exception.spi.AbstractSQLExceptionConversionDelegate
getConversionContext
-
-
-
-
Constructor Detail
-
SQLExceptionTypeDelegate
public SQLExceptionTypeDelegate(ConversionContext conversionContext)
-
-
Method Detail
-
convert
public JDBCException convert(SQLException sqlException, String message, String sql)
Description copied from interface:SQLExceptionConversionDelegate
Convert the givenSQLException
to a subtype ofJDBCException
, if possible.- Parameters:
sqlException
- TheSQLException
to be convertedmessage
- An optional error messagesql
- The SQL statement that resulted in the exception- Returns:
- The resulting
JDBCException
, ornull
if this delegate does not know how to interpret the givenSQLException
.
-
-