Package javax.sql.rowset

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


        /*
         * Update the third row. Filter has no effect here.
         */
        assertTrue(filteredRowSet.last());
        assertEquals("test4", filteredRowSet.getString(2));
        filteredRowSet.updateString(2, "update4");
        filteredRowSet.updateRow();
        assertEquals("update4", filteredRowSet.getString(2));
        // the updated row becomes not visible through filter
        assertTrue(filteredRowSet.last());
        assertEquals("test3", filteredRowSet.getString(2));
View Full Code Here


        // not filtered
        assertEquals(1, filteredRowSet.getRow());
        assertEquals("hermit", filteredRowSet.getString(2));

        filteredRowSet.updateString(2, "update");
        assertEquals("update", filteredRowSet.getString(2));

        filteredRowSet.next();
        assertEquals(2, filteredRowSet.getRow());
        assertEquals("test", filteredRowSet.getString(2));
View Full Code Here

        assertTrue(filteredRowSet.next());
        assertEquals("update", filteredRowSet.getString(2));

        filteredRowSet.setFilter(range);
        assertEquals("update", filteredRowSet.getString(2));
        filteredRowSet.updateString(2, "testUpdate");

        filteredRowSet.next();
        assertEquals(2, filteredRowSet.getRow());
        assertEquals("test", filteredRowSet.getString(2));
View Full Code Here

         * TODO Call updateXXX() would throw NullPointerException on insert row
         * when running on RI.
         */
        filteredRowSet.moveToInsertRow();
        filteredRowSet.updateInt(1, 10);
        filteredRowSet.updateString(2, "insert10");
        filteredRowSet.insertRow();
        filteredRowSet.moveToCurrentRow();
    }

    public void testFilter_Insert() throws Exception {
View Full Code Here

         */
        filteredRowSet.afterLast();
        filteredRowSet.moveToInsertRow();
        filteredRowSet.updateInt(1, 200);
        try {
            filteredRowSet.updateString("NAME", "test200");
            fail("should throw SQLException");
        } catch (SQLException e) {
            filteredRowSet.updateString("NAME", "insert200");
        }
        filteredRowSet.insertRow();
View Full Code Here

        filteredRowSet.updateInt(1, 200);
        try {
            filteredRowSet.updateString("NAME", "test200");
            fail("should throw SQLException");
        } catch (SQLException e) {
            filteredRowSet.updateString("NAME", "insert200");
        }
        filteredRowSet.insertRow();
        filteredRowSet.moveToCurrentRow();

        /*
 
View Full Code Here

        /*
         * Update the third row. Filter has no effect here.
         */
        assertTrue(filteredRowSet.last());
        assertEquals("test4", filteredRowSet.getString(2));
        filteredRowSet.updateString(2, "update4");
        filteredRowSet.updateRow();
        assertEquals("update4", filteredRowSet.getString(2));
        // the updated row becomes not visible through filter
        assertTrue(filteredRowSet.last());
        assertEquals("test3", filteredRowSet.getString(2));
View Full Code Here

         * when running on RI.
         */
        filteredRowSet.moveToInsertRow();
        if ("true".equals(System.getProperty("Testing Harmony"))) {
            filteredRowSet.updateInt(1, 10);
            filteredRowSet.updateString(2, "insert10");
            filteredRowSet.insertRow();
        } else {
            try {
                filteredRowSet.updateInt(1, 10);
                fail("should throw NullPointerException");
View Full Code Here

                fail("should throw NullPointerException");
            } catch (NullPointerException e) {
                // expected
            }
            try {
                filteredRowSet.updateString(2, "insert10");
                fail("should throw NullPointerException");
            } catch (NullPointerException e) {
                // expected
            }
            try {
View Full Code Here

         */
        filteredRowSet.afterLast();
        filteredRowSet.moveToInsertRow();
        filteredRowSet.updateInt(1, 200);
        try {
            filteredRowSet.updateString("NAME", "test200");
            fail("should throw SQLException");
        } catch (SQLException e) {
            filteredRowSet.updateString("NAME", "insert200");
        }
        filteredRowSet.insertRow();
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.