Examples of ResultSetException


Examples of org.skife.jdbi.v2.exceptions.ResultSetException

        ResultSet rs;
        try {
            rs = this.stmt.getReturnResultSet();
        }
        catch (SQLException e) {
            throw new ResultSetException("Unable to retrieve return result set", e);
        }

        this.results = new ArrayList<ResultType>();
        try {
            int i = 0;
            while (rs.next()) {
                results.add(mapper.map(i++, rs, context));
            }
        }
        catch (SQLException e) {
            throw new ResultSetException("Unable to retrieve results from returned result set", e);
        }
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.ResultSetException

        try {
            hasNext = results.next();
        }
        catch (SQLException e) {
            throw new ResultSetException("Unable to advance result set", e);
        }
        if (!hasNext) {
            try {
                results.close();
            }
            catch (SQLException e) {
                throw new ResultSetException("Unable to close result set after iterating through to the end", e);
            }
        }
        alreadyAdvanced = true;
        return hasNext;
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.ResultSetException

                if (!results.next()) {
                    throw new IllegalStateException("No element to advance to");
                }
            }
            catch (SQLException e) {
                throw new ResultSetException("Unable to advance result set", e);
            }
        }
        alreadyAdvanced = false;
        try {
            return mapper.map(count++, results, context);
        }
        catch (SQLException e) {
            throw new ResultSetException("Error thrown mapping result set into return type", e);
        }
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.ResultSetException

        {
            m = r.getMetaData();
        }
        catch (SQLException e)
        {
            throw new ResultSetException("Unable to obtain metadata from result set", e);
        }

        try
        {
            for (int i = 0; i < m.getColumnCount(); i ++)
            {
                String key = m.getColumnName(i);
                String alias = m.getColumnLabel(i);
                Object value = r.getObject(i);
                row.put(alias != null ? alias : key, value);
            }
        }
        catch (SQLException e)
        {
            throw new ResultSetException("Unable to access specific metadata from " +
                                         "result set metadata", e);
        }
        return row;
    }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.ResultSetException

            try {
                rs = stmt.getResultSet();
                return munger.munge(stmt);
            }
            catch (SQLException e) {
                throw new ResultSetException("Exception thrown while attempting to traverse the result set", e);
            }
        }
        finally {
            cleanup.cleanup(this, null, rs);
        }
View Full Code Here

Examples of org.skife.jdbi.v2.exceptions.ResultSetException

        {
            m = r.getMetaData();
        }
        catch (SQLException e)
        {
            throw new ResultSetException("Unable to obtain metadata from result set", e);
        }

        try
        {
            for (int i = 1; i <= m.getColumnCount(); i ++)
            {
                String key = m.getColumnName(i);
                String alias = m.getColumnLabel(i);
                Object value = r.getObject(i);
                row.put(alias != null ? alias : key, value);
            }
        }
        catch (SQLException e)
        {
            throw new ResultSetException("Unable to access specific metadata from " +
                                         "result set metadata", e);
        }
        return row;
    }
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.