Examples of acceptChanges()


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

        filteredRowSet.setFilter(range);

        assertTrue(filteredRowSet.first());
        assertEquals(2, filteredRowSet.getInt(1));

        filteredRowSet.acceptChanges(conn);
        rs = st.executeQuery("SELECT COUNT(*) FROM USER_INFO WHERE ID = 1");
        assertTrue(rs.next());
        assertEquals(1, rs.getInt(1));

        /*
 
View Full Code Here

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

        /*
         * Remove filter
         */
        filteredRowSet.setFilter(null);
        filteredRowSet.acceptChanges(conn);
        rs = st.executeQuery("SELECT COUNT(*) FROM USER_INFO WHERE ID = 1");
        assertTrue(rs.next());
        assertEquals(1, rs.getInt(1));
        /*
         * The first row has been deleted from FilteredRowSet. However, it isn't
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

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

        filteredRowSet.setFilter(range);

        assertTrue(filteredRowSet.first());
        assertEquals(2, filteredRowSet.getInt(1));

        filteredRowSet.acceptChanges(conn);
        rs = st.executeQuery("SELECT COUNT(*) FROM USER_INFO WHERE ID = 1");
        assertTrue(rs.next());
        assertEquals(1, rs.getInt(1));

        /*
 
View Full Code Here

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

        /*
         * Remove filter
         */
        filteredRowSet.setFilter(null);
        filteredRowSet.acceptChanges(conn);
        rs = st.executeQuery("SELECT COUNT(*) FROM USER_INFO WHERE ID = 1");
        assertTrue(rs.next());
        assertEquals(1, rs.getInt(1));
        /*
         * The first row has been deleted from FilteredRowSet. However, it isn't
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

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

        filteredRowSet.setFilter(range);

        assertTrue(filteredRowSet.first());
        assertEquals(2, filteredRowSet.getInt(1));

        filteredRowSet.acceptChanges(conn);
        rs = st.executeQuery("SELECT COUNT(*) FROM USER_INFO WHERE ID = 1");
        assertTrue(rs.next());
        assertEquals(1, rs.getInt(1));

        /*
 
View Full Code Here

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

        /*
         * Remove filter
         */
        filteredRowSet.setFilter(null);
        filteredRowSet.acceptChanges(conn);
        rs = st.executeQuery("SELECT COUNT(*) FROM USER_INFO WHERE ID = 1");
        assertTrue(rs.next());
        assertEquals(1, rs.getInt(1));
        /*
         * The first row has been deleted from FilteredRowSet. However, it isn't
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.