Examples of SQLErrorCodeSQLExceptionTranslator


Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

                this.stockNames.add(temp.getValue());
                System.out.println("\t" + temp.getValue());
            }
        }
        catch (SQLException qq_error) {
            throw new SQLErrorCodeSQLExceptionTranslator(dBConnection.getDataSource()).translate("Running SQL", qq_SQL, qq_error);
        }
        finally {
            dBConnection.cleanup(qq_cmd);
        }
    }
View Full Code Here

Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

                row.getTextValue().setValue( temp.getValue() );
                this.stockNameList.add(row);
            }
        }
        catch (SQLException qq_error) {
            throw new SQLErrorCodeSQLExceptionTranslator(dBConnection.getDataSource()).translate("Running SQL", qq_SQL, qq_error);
        }
        finally {
            dBConnection.cleanup(qq_cmd);
        }
    }
View Full Code Here

Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

     * database type with a generic database type
     * @param e The exception that was thrown
     * @return
     */
    public static DataAccessException translateSQLException(SQLException e){
      return new SQLErrorCodeSQLExceptionTranslator().translate("SQL tasks", null, e );
    }
View Full Code Here

Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

     * @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 );
        }
    }
View Full Code Here

Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

                row.getTextValue().setValue( temp.getValue() );
                this.stockNameList.add(row);
            }
        }
        catch (SQLException qq_error) {
            throw new SQLErrorCodeSQLExceptionTranslator(dBConnection.getDataSource()).translate("Running SQL", qq_SQL, qq_error);
        }
        finally {
            dBConnection.cleanup(qq_cmd);
        }
    }
View Full Code Here

Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

                row.getTextValue().setValue( temp.getValue() );
                this.stockNameList.add(row);
            }
        }
        catch (SQLException qq_error) {
            throw new SQLErrorCodeSQLExceptionTranslator(dBConnection.getDataSource()).translate("Running SQL", qq_SQL, qq_error);
        }
        finally {
            dBConnection.cleanup(qq_cmd);
        }
    }
View Full Code Here

Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

                s.setPrev(null);
                this.cache.remove(s.getKey());
                try {
                    s.getHandle().close();
                } catch (java.sql.SQLException qq_SQLEx) {
                    throw new SQLErrorCodeSQLExceptionTranslator().translate("SQL tasks", "", qq_SQLEx );
                }

            }

        }
View Full Code Here

Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

   
                if (!(this.getStatementCache().getOn())) {
                    try {
                        statement.getHandle().close();
                    } catch (java.sql.SQLException qq_SQLEx) {
                        throw new SQLErrorCodeSQLExceptionTranslator().translate("SQL tasks", "", qq_SQLEx );
                    }
                }
   
            }
        }
        catch (SQLException e) {
            DataAccessException qq_dae = new SQLErrorCodeSQLExceptionTranslator().translate("SQL tasks", "", e );
            ErrorMgr.addError(e);
            ErrorMgr.addError(qq_dae);
            throw qq_dae;
        }
    }
View Full Code Here

Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

   
                if (!(this.getStatementCache().getOn())) {
                    try {
                        statement.getHandle().close();
                    } catch (java.sql.SQLException qq_SQLEx) {
                        throw new SQLErrorCodeSQLExceptionTranslator().translate("SQL tasks", "", qq_SQLEx );
                    }
                }
   
            }
   
            return result;
        }
        catch (SQLException e) {
            DataAccessException qq_dae = new SQLErrorCodeSQLExceptionTranslator().translate("SQL tasks", "", e );
            ErrorMgr.addError(e);
            ErrorMgr.addError(qq_dae);
            throw qq_dae;
        }
    }
View Full Code Here

Examples of org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator

                for (int i = 1; i <= numCols; i++) {
                    cds.add(new DBColumnDesc(data, i));
                }
            }
        } catch (SQLException e) {
            DataAccessException errorVar = new SQLErrorCodeSQLExceptionTranslator().translate("Cannot get column List from result set\n" + e.getMessage(), "", e );
            ErrorMgr.addError(errorVar);
            throw errorVar;
            // PM:16/07/2008
        } catch (NullPointerException e){
          String msg = (e.getMessage() == null) ? e.getClass().getName() : e.getMessage();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.