Package cc.concurrent.mango.exception

Examples of cc.concurrent.mango.exception.UncheckedSQLException


                Object key = JdbcUtils.getResultSetValue(rs, 1, holder.getKeyClass());
                holder.setKey(key);
            }
            return r;
        } catch (SQLException e) {
            throw new UncheckedSQLException(e.getMessage(), e);
        } finally {
            JdbcUtils.closeResultSet(rs);
            JdbcUtils.closeStatement(ps);
            JdbcUtils.closeConnection(conn);
View Full Code Here


            ps = conn.prepareStatement(sql);
            setBatchValues(ps, batchArgs);
            r = ps.executeBatch();
            return r;
        } catch (SQLException e) {
            throw new UncheckedSQLException(e.getMessage(), e);
        } finally {
            JdbcUtils.closeStatement(ps);
            JdbcUtils.closeConnection(conn);

            if (logger.isDebugEnabled()) {
View Full Code Here

                    ps = conn.prepareStatement(sql);
                    setValues(ps, args);
                    r[i] = ps.executeUpdate();
                    success[i] = true;
                } catch (SQLException e) {
                    throw new UncheckedSQLException(e.getMessage(), e);
                } finally {
                    JdbcUtils.closeStatement(ps);

                    if (logger.isDebugEnabled()) {
                        if (success[i]) {
View Full Code Here

            rs = ps.executeQuery();
            r = rse.extractData(rs);
            success = true;
            return r;
        } catch (SQLException e) {
            throw new UncheckedSQLException(e.getMessage(), e);
        } finally {
            JdbcUtils.closeResultSet(rs);
            JdbcUtils.closeStatement(ps);
            JdbcUtils.closeConnection(conn);
View Full Code Here

            if (!rs.next()) {
                throw new GeneratedKeysException("please check whether the table has auto increment key");
            }
            return rs.getInt(1);
        } catch (SQLException e) {
            throw new UncheckedSQLException(e.getMessage(), e);
        } finally {
            JdbcUtils.closeResultSet(rs);
            JdbcUtils.closeStatement(ps);
            JdbcUtils.closeConnection(conn);
        }
View Full Code Here

        try {
            ps = conn.prepareStatement(sql);
            setBatchValues(ps, batchArgs);
            return ps.executeBatch();
        } catch (SQLException e) {
            throw new UncheckedSQLException(e.getMessage(), e);
        } finally {
            JdbcUtils.closeStatement(ps);
            JdbcUtils.closeConnection(conn);
        }
    }
View Full Code Here

            ps = conn.prepareStatement(sql);
            setValues(ps, args);
            rs = ps.executeQuery();
            return rse.extractData(rs);
        } catch (SQLException e) {
            throw new UncheckedSQLException(e.getMessage(), e);
        } finally {
            JdbcUtils.closeResultSet(rs);
            JdbcUtils.closeStatement(ps);
            JdbcUtils.closeConnection(conn);
        }
View Full Code Here

                Object key = JdbcUtils.getResultSetValue(rs, 1, holder.getKeyClass());
                holder.setKey(key);
            }
            return r;
        } catch (SQLException e) {
            throw new UncheckedSQLException(e.getMessage(), e);
        } finally {
            JdbcUtils.closeResultSet(rs);
            JdbcUtils.closeStatement(ps);
            JdbcUtils.closeConnection(conn);
View Full Code Here

            ps = conn.prepareStatement(sql);
            setBatchValues(ps, batchArgs);
            r = ps.executeBatch();
            return r;
        } catch (SQLException e) {
            throw new UncheckedSQLException(e.getMessage(), e);
        } finally {
            JdbcUtils.closeStatement(ps);
            JdbcUtils.closeConnection(conn);

            if (logger.isDebugEnabled()) {
View Full Code Here

                    ps = conn.prepareStatement(sql);
                    setValues(ps, args);
                    r[i] = ps.executeUpdate();
                    success[i] = true;
                } catch (SQLException e) {
                    throw new UncheckedSQLException(e.getMessage(), e);
                } finally {
                    JdbcUtils.closeStatement(ps);

                    if (logger.isDebugEnabled()) {
                        if (success[i]) {
View Full Code Here

TOP

Related Classes of cc.concurrent.mango.exception.UncheckedSQLException

Copyright © 2018 www.massapicom. 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.