Package javax.sql.rowset

Examples of javax.sql.rowset.CachedRowSet.populate()


   * @see #newCachedRowSet
   * @see org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet
   */
  protected SqlRowSet createSqlRowSet(ResultSet rs) throws SQLException {
    CachedRowSet rowSet = newCachedRowSet();
    rowSet.populate(rs);
    return new ResultSetWrappingSqlRowSet(rowSet);
  }

  /**
   * Create a new CachedRowSet instance, to be populated by
View Full Code Here


            connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
         ResultSet resultSet = statement.executeQuery(query);

         CachedRowSet crs = new CachedRowSetImpl();
         crs.setPageSize(pageList.getPageSize());
         crs.populate(resultSet, (pageList.getCurrentPage() - 1) * pageList.getPageSize() + 1);

         while (crs.next())
         {
            T bean = dao_.createInstance();
            dao_.getDBObjectMapper().mapResultSet(crs, bean);
View Full Code Here

            model =  m_model.buildTableModel(rs);
            //model = new DefaultTableModel();
         
          else {
            CachedRowSet crs = new CachedRowSetImpl();
            crs.populate(rs);
            model = m_model.buildTableModel(crs);
          }

          table.setModel(model);
         
View Full Code Here

    this.rs = this.stmt
        .executeQuery("select firstName as 'first person' from bug49516");

    crs = (CachedRowSet)Class.forName("com.sun.rowset.CachedRowSetImpl").newInstance();
    crs.populate(this.rs);
    crs.first();

    assertEquals("John", crs.getString(1));
  }
View Full Code Here

    this.rs = this.stmt
        .executeQuery("select firstName as 'first person' from bug49516");

    crs = (CachedRowSet)Class.forName("com.sun.rowset.CachedRowSetImpl").newInstance();
    crs.populate(this.rs);
    crs.first();

    assertEquals("John", crs.getString(1));
  }
View Full Code Here

    this.rs = noBlobsConn.createStatement().executeQuery(
        "SELECT PASSWORD ('SOMETHING')");

    crs = (CachedRowSet)Class.forName("com.sun.rowset.CachedRowSetImpl").newInstance();
    crs.populate(this.rs);
    crs.first();

    assertEquals(fromPlainResultSet, crs.getString(1));
  }
View Full Code Here

            connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
         ResultSet resultSet = statement.executeQuery(query);

         CachedRowSet crs = new CachedRowSetImpl();
         crs.setPageSize(pageList.getPageSize());
         crs.populate(resultSet, (pageList.getCurrentPage() - 1) * pageList.getPageSize() + 1);

         while (crs.next())
         {
            T bean = dao_.createInstance();
            dao_.getDBObjectMapper().mapResultSet(crs, bean);
View Full Code Here

            // Need to use a CachedRowSet that caches its rows in memory, which
            // makes it possible to operate without always being connected to
            // its data source
            CachedRowSet rowset = new CachedRowSetImpl();
            rowset.populate(rs);
            return rowset;
        } catch (SQLException ex) {
            throw new DatabaseException(ex.getMessage(), ex);
        } finally {
            safeCloseResultSet(rs);
View Full Code Here

            // Need to use a CachedRowSet that caches its rows in memory, which
            // makes it possible to operate without always being connected to
            // its data source
            CachedRowSet rowset = new CachedRowSetImpl();
            rowset.populate(rs);
            return rowset;
        } catch (SQLException ex) {
            throw new DatabaseException(ex.getMessage(), ex);
        } finally {
            safeCloseResultSet(rs);
View Full Code Here

   * @return
   * @throws SQLException
   */
  private static CachedRowSet cacheResultSet(ResultSet rs) throws SQLException {
    CachedRowSet rows = null;//new com.sun.rowset.WebRowSetImpl();
    rows.populate(rs);
    return rows;
  }

  /** Set the output to the given filename.
   * @param fileName
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.