Examples of acceptChanges()


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

        copy.updateString(2, "updated");
        assertEquals("updated", copy.getString(2));
        assertEquals("test3", crset.getString(2));
        copy.updateRow();
        copy.acceptChanges();

        assertEquals("updated", copy.getString(2));
        assertEquals("test3", crset.getString(2));

        crset.updateString(2, "again");
View Full Code Here

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

        CachedRowSet crsetCopy = crset.createCopy();

        crsetCopy.updateString(2, "copyTest3");
        crsetCopy.updateRow();
        crsetCopy.acceptChanges();

        assertEquals("copyTest3", crsetCopy.getString(2));

        assertEquals("test3", crset.getString(2));
View Full Code Here

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

        copy.updateString(2, "updated");
        assertEquals("updated", copy.getString(2));
        assertEquals("test3", crset.getString(2));
        copy.updateRow();
        copy.acceptChanges();

        assertEquals("updated", copy.getString(2));
        assertEquals("test3", crset.getString(2));

        crset.updateString(2, "again");
View Full Code Here

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

        crsetShared.updateString(2, "modify3");
        assertEquals("modify3", crsetShared.getString(2));
        assertEquals("modify3", crset.getString(2));
        crsetShared.updateRow();
        listener.clear();
        crsetShared.acceptChanges();
        assertEquals(CachedRowSetListenerTest.EVENT_ROWSET_CHANGED, listener
                .getTag());

        // when move the duplicate's cursor, the original shouldn't be affected
        crsetShared.absolute(1);
View Full Code Here

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

        copy.updateString(2, "updated");
        assertEquals("updated", copy.getString(2));
        assertEquals("test3", crset.getString(2));

        copy.updateRow();
        copy.acceptChanges();

        assertEquals(copy.getString(2), "updated");
        assertEquals(crset.getString(2), "test3");

        crset.updateString(2, "again");
View Full Code Here

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

        copy.updateString(2, "updated");
        assertEquals("updated", copy.getString(2));
        assertEquals("test3", crset.getString(2));
        copy.updateRow();
        copy.acceptChanges();

        assertEquals("updated", copy.getString(2));
        assertEquals("test3", crset.getString(2));

        crset.updateString(2, "again");
View Full Code Here

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

        crsetShared.updateString(2, "modify3");
        assertEquals("modify3", crsetShared.getString(2));
        assertEquals("modify3", crset.getString(2));
        crsetShared.updateRow();
        listener.clear();
        crsetShared.acceptChanges();
        assertEquals(CachedRowSetListenerTest.EVENT_ROWSET_CHANGED, listener
                .getTag());

        // when move the duplicate's cursor, the original shouldn't be affected
        crsetShared.absolute(1);
View Full Code Here

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

        CachedRowSet crsetCopy = crset.createCopy();

        crsetCopy.updateString(2, "copyTest3");
        crsetCopy.updateRow();
        crsetCopy.acceptChanges();

        assertEquals("copyTest3", crsetCopy.getString(2));

        assertEquals("test3", crset.getString(2));
View Full Code Here

Examples of javax.sql.rowset.FilteredRowSet.acceptChanges()

        filteredRowSet.setFilter(null);
        assertTrue(filteredRowSet.last());
        assertEquals(200, filteredRowSet.getInt(1));
        assertTrue(filteredRowSet.rowInserted());
        filteredRowSet.setFilter(range);
        filteredRowSet.acceptChanges(conn);
        // check database: the inserted row isn't commited to database
        rs = st.executeQuery("SELECT * FROM USER_INFO");
        index = 0;
        while (rs.next()) {
            index++;
View Full Code Here

Examples of javax.sql.rowset.FilteredRowSet.acceptChanges()

        // the updated row becomes not visible through filter
        assertTrue(filteredRowSet.last());
        assertEquals("test3", filteredRowSet.getString(2));

        // commit to database
        filteredRowSet.acceptChanges(conn);
        rs = st
                .executeQuery("SELECT COUNT(*) FROM USER_INFO WHERE NAME = 'update4'");
        assertTrue(rs.next());
        assertEquals(0, rs.getInt(1));

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.