Package javax.sql.rowset

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


        filteredRowSet.beforeFirst();
        assertTrue(filteredRowSet.relative(2));
        assertEquals(3, filteredRowSet.getInt(1));
        assertEquals(3, filteredRowSet.getRow());
        assertFalse(filteredRowSet.relative(-2));
        assertTrue(filteredRowSet.isBeforeFirst());
    }

    public void testCursorMove() throws Exception {
        insertMoreData(30);
View Full Code Here


            assertTrue(filteredRowSet.absolute(1));
        } else {
            assertFalse(filteredRowSet.absolute(1));
        }
        assertEquals("hermit", filteredRowSet.getString(2));
        assertTrue(filteredRowSet.relative(1));
        assertEquals("test4", filteredRowSet.getString(2));
        /*
         * First call absolute(2), then call relative(-1), the cursor returns
         * the first row.
         */
 
View Full Code Here

         * First call absolute(2), then call relative(-1), the cursor returns
         * the first row.
         */
        assertTrue(filteredRowSet.absolute(2));
        assertEquals("test4", filteredRowSet.getString(2));
        assertTrue(filteredRowSet.relative(-1));
        assertEquals("hermit", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.last());
        assertEquals("test34", filteredRowSet.getString(2));

View Full Code Here

        assertEquals("test34", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.previous());
        assertEquals("test32", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(-1));
        assertEquals("test30", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.absolute(5));
        assertEquals("test10", filteredRowSet.getString(2));
View Full Code Here

        assertEquals("test30", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.absolute(5));
        assertEquals("test10", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(3));
        assertEquals("test16", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(-3));
        assertEquals("test10", filteredRowSet.getString(2));
View Full Code Here

        assertEquals("test10", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(3));
        assertEquals("test16", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(-3));
        assertEquals("test10", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(4));
        assertEquals("test18", filteredRowSet.getString(2));
View Full Code Here

        assertEquals("test16", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(-3));
        assertEquals("test10", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(4));
        assertEquals("test18", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(13));
        assertEquals("test34", filteredRowSet.getString(2));
View Full Code Here

        assertEquals("test10", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(4));
        assertEquals("test18", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(13));
        assertEquals("test34", filteredRowSet.getString(2));

        assertFalse(filteredRowSet.next());
        assertTrue(filteredRowSet.isAfterLast());
View Full Code Here

        assertTrue(filteredRowSet.isAfterLast());

        assertTrue(filteredRowSet.absolute(22));
        assertEquals("test34", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(-21));
        assertEquals("hermit", filteredRowSet.getString(2));

        assertFalse(filteredRowSet.relative(-1));
        assertTrue(filteredRowSet.isBeforeFirst());
    }
View Full Code Here

        assertEquals("test34", filteredRowSet.getString(2));

        assertTrue(filteredRowSet.relative(-21));
        assertEquals("hermit", filteredRowSet.getString(2));

        assertFalse(filteredRowSet.relative(-1));
        assertTrue(filteredRowSet.isBeforeFirst());
    }

    public void testNextAndPrevious() throws Exception {
        FilteredRowSet filteredRowSet = newFilterRowSet();
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.