org.hibernate.exception.internal
Class SQLExceptionTypeDelegate

java.lang.Object
  extended by org.hibernate.exception.spi.AbstractSQLExceptionConversionDelegate
      extended by org.hibernate.exception.internal.SQLExceptionTypeDelegate
All Implemented Interfaces:
SQLExceptionConversionDelegate

public class SQLExceptionTypeDelegate
extends AbstractSQLExceptionConversionDelegate

SQLExceptionConverter implementation that does conversion based on the JDBC 4 defined SQLException sub-type hierarchy.


Constructor Summary
SQLExceptionTypeDelegate(ConversionContext conversionContext)
           
 
Method Summary
 JDBCException convert(SQLException sqlException, String message, String sql)
          Convert the given SQLException into the Hibernate JDBCException hierarchy.
 
Methods inherited from class org.hibernate.exception.spi.AbstractSQLExceptionConversionDelegate
getConversionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 given SQLException into the Hibernate JDBCException hierarchy.

Parameters:
sqlException - The SQLException to be converted.
message - An (optional) error message.
sql - The SQL statement, if one, being performed when the exception occurred.
Returns:
The resulting JDBCException, can be null


Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.