com.interface21.jdbc.core.support
Class OracleSQLExceptionTranslater

java.lang.Object
  |
  +--com.interface21.jdbc.core.support.OracleSQLExceptionTranslater
All Implemented Interfaces:
SQLExceptionTranslater

public class OracleSQLExceptionTranslater
extends java.lang.Object
implements SQLExceptionTranslater

Implementation of SQLExceptionTranslator that uses Oracle vendor code, as included in the ORA-nnn methods. More precise than SQLState implementation, but Oracle-specific. The JdbcTemplate class enables error handling to be parameterized without making application's dependent on a particular RDBMS.
****TODO: this class should handle a much wider range of Oracle error codes. This can easily be done by adding additional values to the switch.

Version:
$Id: OracleSQLExceptionTranslater.java,v 1.1 2003/05/27 18:05:05 jhoeller Exp $
Author:
Rod Johnson

Constructor Summary
OracleSQLExceptionTranslater()
           
 
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
 

Constructor Detail

OracleSQLExceptionTranslater

public OracleSQLExceptionTranslater()
Method Detail

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(java.lang.String, java.lang.String, java.sql.SQLException)


Rod Johnson and Spring contributors 2001-2003.