* @return
*/
public static DataAccessException translateSQLException(int dbType, SQLException e){
switch (dbType) {
case Constants.DB_VT_DB2:
return new SQLErrorCodeSQLExceptionTranslator("DB2").translate("SQL tasks", null, e );
case Constants.DB_VT_INFORMIX:
return new SQLErrorCodeSQLExceptionTranslator("Informix").translate("SQL tasks", null, e );
case Constants.DB_VT_INGRES:
return new SQLErrorCodeSQLExceptionTranslator("PostgreSQL").translate("SQL tasks", null, e );
case Constants.DB_VT_MYSQL:
return new SQLErrorCodeSQLExceptionTranslator("MySQL").translate("SQL tasks", null, e );
case Constants.DB_VT_ORACLE:
return new SQLErrorCodeSQLExceptionTranslator("Oracle").translate("SQL tasks", null, e );
case Constants.DB_VT_SYBASE:
return new SQLErrorCodeSQLExceptionTranslator("Sybase").translate("SQL tasks", null, e );
default:
return new SQLErrorCodeSQLExceptionTranslator().translate("SQL tasks", null, e );
}
}