Package javax.sql.rowset

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


    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


        super();
        this.statement = pStatement;
        if (pAllowOffline) {
          try {
            CachedRowSet rowSet = new CachedRowSetImpl();
            rowSet.populate(pResults);
              this.resultSet = rowSet;
          }
          catch (SQLException e) {
                UsageException errorVar = new UsageException(e.getMessage(), SP_ER_USER, SP_ER_PARAMETERERROR, e);
                ErrorMgr.addError(errorVar);
View Full Code Here

        public ResultSetMetaData getMetaData() throws SQLException {
          return md;
        }
      };
     
      rowSet.populate(rsNew);
      resultSet = rowSet;
     
      this.resultSetType = rs.getType();
      this.resultSetConcurrency = rs.getConcurrency();
    }
View Full Code Here

   * @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

   * @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

        // fill the duplicate CachedRowSet with data, check the listener
        Listener listener = new Listener();
        crsetCopySchema.addRowSetListener(listener);
        assertNull(listener.getTag());
        rs = st.executeQuery("select * from USER_INFO");
        crsetCopySchema.populate(rs);
        // TODO: in the Harmony implementation, need to call notifyRowSetChanged
        // at the suitable place
        // assertEquals("rowSetChanged", listener.getTag());
        listener.setTag(null);
        // the move of the original's cursor shouldn't affect the duplicate
View Full Code Here

        // fill the duplicate CachedRowSet with data, check the listener
        Listener listener = new Listener();
        crsetCopySchema.addRowSetListener(listener);
        assertNull(listener.getTag());
        rs = st.executeQuery("select * from USER_INFO");
        crsetCopySchema.populate(rs);
        // TODO: in the Harmony implementation, need to call notifyRowSetChanged
        // at the suitable place
        // assertEquals("rowSetChanged", listener.getTag());
        listener.setTag(null);
        // the move of the original's cursor shouldn't affect the duplicate
View Full Code Here

        if (sqlConnection != null && sqlStatement != null && !sqlStatement.isEmpty()) {
            Statement statement = sqlConnection.createStatement();

            if (needResult) {
                cachedRowSet = new CachedRowSetImpl();
                cachedRowSet.populate(statement.executeQuery(sqlStatement));
            } else {
                statement.executeUpdate(sqlStatement);
            }

            statement.close();
View Full Code Here

        Connection sqlConnection = getConnection(credentials);

        if (sqlConnection != null && preparedStatement != null) {
            if (needResult) {
                cachedRowSet = new CachedRowSetImpl();
                cachedRowSet.populate(preparedStatement.executeQuery());
            } else {
                preparedStatement.executeUpdate();
            }

            preparedStatement.close();
View Full Code Here

        // fill the duplicate CachedRowSet with data, check the listener
        Listener listener = new Listener();
        crsetCopySchema.addRowSetListener(listener);
        assertNull(listener.getTag());
        rs = st.executeQuery("select * from USER_INFO");
        crsetCopySchema.populate(rs);
        assertEquals("rowSetChanged", listener.getTag());
        listener.clear();
        // the move of the original's cursor shouldn't affect the duplicate
        crset.next();
        assertNull(listener.getTag());
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.