Top Description Methods
org.hibernate.exception.spi

public Interface SQLExceptionConversionDelegate

Known Direct Implementers
org.hibernate.exception.spi.AbstractSQLExceptionConversionDelegate
Annotations
@FunctionalInterface
Imports
java.sql.SQLException, org.hibernate.JDBCException, org.checkerframework.checker.nullness.qual.Nullable

Allow a SQLExceptionConverter to work by chaining together multiple delegates. The main difference between a delegate and a full-fledged converter is that a delegate may return null.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public @Nullable JDBCException

Returns:

The resulting JDBCException, or null if this delegate does not know how to interpret the given SQLException.
convert
(SQLException
The SQLException to be converted
sqlException
,
String
An optional error message
message
,
String
The SQL statement that resulted in the exception
sql
)

Convert the given SQLException to a subtype of JDBCException, if possible.

Method Detail

convertback to summary
public @Nullable JDBCException convert(SQLException sqlException, String message, String sql)

Convert the given SQLException to a subtype of JDBCException, if possible.

Parameters
sqlException:SQLException

The SQLException to be converted

message:String

An optional error message

sql:String

The SQL statement that resulted in the exception

Returns:@Nullable JDBCException

The resulting JDBCException, or null if this delegate does not know how to interpret the given SQLException.