Package javax.sql.rowset

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


    }

    public void testJoin_CursorPosition() throws Exception {
        rs = st.executeQuery("select * from BOOKS");
        CachedRowSet crset2 = newNoInitialInstance();
        crset2.populate(rs);

        // TODO
        // Tests when there is no rowSet.
        // Not determined in harmony.
        // assertTrue(jrs.isLast());
View Full Code Here


    }

    public void testJoin_Update() throws Exception {
        rs = st.executeQuery("select * from BOOKS");
        CachedRowSet crset2 = newNoInitialInstance();
        crset2.populate(rs);

        crset.first();
        crset.updateString(2, "Updated");

        jrs.addRowSet(crset, 1);
View Full Code Here

    }

    public void testJoin_Delete() throws Exception {
        rs = st.executeQuery("select * from BOOKS");
        CachedRowSet crset2 = newNoInitialInstance();
        crset2.populate(rs);

        jrs.addRowSet(crset, 1);
        jrs.first();
        jrs.deleteRow();

View Full Code Here

    }

    public void testJoin_Delete2() throws Exception {
        rs = st.executeQuery("select * from BOOKS");
        CachedRowSet crset2 = newNoInitialInstance();
        crset2.populate(rs);

       crset.absolute(3);
        crset.deleteRow();
        crset.setShowDeleted(true);

View Full Code Here

        }
        assertEquals(3, rowNum);

        CachedRowSet crset2 = newNoInitialInstance();
        rs = st.executeQuery("select * from books");
        crset2.populate(rs);

        crset2.absolute(3);
        crset2.deleteRow();

        jrs.addRowSet(crset2, 1);
View Full Code Here

        }
        assertEquals(4, rowNum);

        CachedRowSet crset2 = newNoInitialInstance();
        rs = st.executeQuery("select * from books");
        crset2.populate(rs);

        crset2.absolute(3);
        crset2.deleteRow();
        crset2.setShowDeleted(true);

View Full Code Here

        assertEquals(4, rowNum);
        assertTrue(jrs.getShowDeleted());

        CachedRowSet crset2 = newNoInitialInstance();
        rs = st.executeQuery("select * from books");
        crset2.populate(rs);

        crset2.absolute(3);
        crset2.deleteRow();
        crset2.setShowDeleted(true);

View Full Code Here

    }
   
    public void testJoin_OriginalShowDeleted3() throws Exception {
        CachedRowSet crset2 = newNoInitialInstance();
        rs = st.executeQuery("select * from books");
        crset2.populate(rs);
       
        jrs.addRowSet(crset, 1);
        jrs.first();
        jrs.deleteRow();
       
View Full Code Here

    public void testGetRowSets_MultipleCachedRowSet() throws Exception {
        Collection collection;

        rs = st.executeQuery("select * from USER_INFO");
        CachedRowSet crset2 = newNoInitialInstance();
        crset2.populate(rs);

        jrs.addRowSet(crset, 1);
        jrs.addRowSet(crset2, 1);

        collection = jrs.getRowSets();
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

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.