Interface SQLExceptionTranslater

All Known Implementing Classes:
SQLStateSQLExceptionTranslater, SQLErrorCodeSQLExceptionTranslater, OracleSQLExceptionTranslater

public interface SQLExceptionTranslater

Interface to be implemented by classes that can translate between SQLExceptions and our data access strategy-agnostic com.interface21.dao.DataAccessException.
Implementations can be generic (for example, using SQLState codes for JDBC) or proprietary (for example, using Oracle error codes) for greater precision.

$Id:,v 2003/02/11 08:10:23 johnsonr Exp $
Rod Johnson
See Also:

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.

Method Detail


public 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.
task - readable text describing the task being attempted
sql - SQL query or update that caused the problem. May be null.
sqlex - SQLException encountered by JDBC implementation

Rod Johnson and Spring contributors 2001-2003.