public int getCount(JDBCStore store) throws SQLException { Connection conn = null; PreparedStatement stmnt = null; ResultSet rs = null; try { SQLBuffer sql = toSelectCount(); conn = store.getNewConnection(); stmnt = prepareStatement(conn, sql, null, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, false); _dict.setQueryTimeout(stmnt, store.getFetchConfiguration().getQueryTimeout()); rs = executeQuery(conn, stmnt, sql, false, store); int count = getCount(rs); return _dict.applyRange(this, count); } finally { if (rs != null) try { rs.close(); } catch (SQLException se) {} if (stmnt != null) try { stmnt.close(); } catch (SQLException se) {} if (conn != null) try { conn.close(); } catch (SQLException se) {} } }
public int getCount(JDBCStore store) throws SQLException { Connection conn = null; PreparedStatement stmnt = null; ResultSet rs = null; try { SQLBuffer sql = toSelectCount(); conn = store.getNewConnection(); stmnt = prepareStatement(conn, sql, null, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, false); _dict.setQueryTimeout(stmnt, store.getFetchConfiguration().getQueryTimeout()); rs = executeQuery(conn, stmnt, sql, false, store); int count = getCount(rs); return _dict.applyRange(this, count); } finally { if (rs != null) try { rs.close(); } catch (SQLException se) {} if (stmnt != null) try { stmnt.close(); } catch (SQLException se) {} if (conn != null) try { conn.close(); } catch (SQLException se) {} } }
public int getCount(JDBCStore store) throws SQLException { Connection conn = null; PreparedStatement stmnt = null; ResultSet rs = null; try { SQLBuffer sql = toSelectCount(); conn = store.getNewConnection(); stmnt = prepareStatement(conn, sql, null, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, false); _dict.setQueryTimeout(stmnt, store.getFetchConfiguration().getQueryTimeout()); rs = executeQuery(conn, stmnt, sql, false, store); int count = getCount(rs); return _dict.applyRange(this, count); } finally { if (rs != null) try { rs.close(); } catch (SQLException se) {} if (stmnt != null) try { stmnt.close(); } catch (SQLException se) {} if (conn != null) try { conn.close(); } catch (SQLException se) {} } }
public int getCount(JDBCStore store) throws SQLException { Connection conn = null; PreparedStatement stmnt = null; ResultSet rs = null; try { SQLBuffer sql = toSelectCount(); conn = store.getNewConnection(); stmnt = prepareStatement(conn, sql, null, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, false); _dict.setQueryTimeout(stmnt, store.getFetchConfiguration().getQueryTimeout()); rs = executeQuery(conn, stmnt, sql, false, store); int count = getCount(rs); return _dict.applyRange(this, count); } finally { if (rs != null) try { rs.close(); } catch (SQLException se) {} if (stmnt != null) try { stmnt.close(); } catch (SQLException se) {} if (conn != null) try { conn.close(); } catch (SQLException se) {} } }