com.interface21.jdbc.core
Class SQLStateSQLExceptionTranslater
java.lang.Object
|
+--com.interface21.jdbc.core.SQLStateSQLExceptionTranslater
- All Implemented Interfaces:
- SQLExceptionTranslater
- public class SQLStateSQLExceptionTranslater
- extends java.lang.Object
- implements SQLExceptionTranslater
Implementation of SQLExceptionTranslater that uses the
SQLState code in the SQL exception.
Can't diagnose all problems, but is portable between
databases.
- Version:
- $Id: SQLStateSQLExceptionTranslater.java,v 1.4 2003/05/28 16:39:13 jhoeller Exp $
- Author:
- Rod Johnson
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
|
Method Summary |
DataAccessException |
translate(java.lang.String task,
java.lang.String sql,
java.sql.SQLException sqlex)
Translate the given SQL exception into a generic
data access exception. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
SQLStateSQLExceptionTranslater
public SQLStateSQLExceptionTranslater()
translate
public DataAccessException translate(java.lang.String task,
java.lang.String sql,
java.sql.SQLException sqlex)
- Description copied from interface:
SQLExceptionTranslater
- Translate the given SQL exception into a generic
data access exception.
- Specified by:
translate in interface SQLExceptionTranslater
- See Also:
SQLExceptionTranslater.translate(String,String,SQLException)
Rod Johnson and Spring contributors 2001-2003.