public class CacheSQLStateConverter extends Object implements SQLExceptionConverter
Constructor and Description |
---|
CacheSQLStateConverter(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 CacheSQLStateConverter(ViolatedConstraintNameExtracter extracter)
public JDBCException convert(SQLException sqlException, String message, String sql)
convert
in interface SQLExceptionConverter
sqlException
- The SQLException to be converted.message
- An optional error message.sql
- Optionally, the sql being performed when the exception occurred.ConstraintViolationException, JDBCConnectionException, SQLGrammarException, LockAcquisitionException
protected 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