public class SQLStateConverter extends Object implements SQLExceptionConverter
| Constructor and Description |
|---|
SQLStateConverter(ViolatedConstraintNameExtracter extracter) |
| Modifier and Type | Method and Description |
|---|---|
JDBCException |
convert(SQLException sqlException,
String message,
String sql)
Convert the given SQLException into Hibernate's JDBCException hierarchy.
|
protected JDBCException |
handledNonSpecificException(SQLException sqlException,
String message,
String sql)
Handle an exception not converted to a specific type based on the SQLState.
|
public SQLStateConverter(ViolatedConstraintNameExtracter extracter)
public JDBCException convert(SQLException sqlException, String message, String sql)
convert in interface SQLExceptionConvertersqlException - The SQLException to be converted.message - An optional error message.sql - Optionally, the sql being performed when the exception occurred.ConstraintViolationException, JDBCConnectionException, SQLGrammarException, LockAcquisitionExceptionprotected JDBCException handledNonSpecificException(SQLException sqlException, String message, String sql)
sqlException - The exception to be handled.message - An optional messagesql - Optionally, the sql being performed when the exception occurred.Copyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved