Package javax.sql.rowset

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


        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

        rs = st.executeQuery("SELECT * FROM USER_INFO");
        filteredRowSet.populate(rs);

        assertTrue(filteredRowSet.absolute(3));
        assertEquals(3, filteredRowSet.getInt(1));
        assertFalse(filteredRowSet.relative(2));

        assertTrue(filteredRowSet.absolute(3));
        assertEquals(3, filteredRowSet.getInt(1));
        assertTrue(filteredRowSet.relative(1));
        assertEquals(4, filteredRowSet.getInt(1));
View Full Code Here

        assertEquals(3, filteredRowSet.getInt(1));
        assertFalse(filteredRowSet.relative(2));

        assertTrue(filteredRowSet.absolute(3));
        assertEquals(3, filteredRowSet.getInt(1));
        assertTrue(filteredRowSet.relative(1));
        assertEquals(4, filteredRowSet.getInt(1));

        assertTrue(filteredRowSet.absolute(3));
        assertEquals(3, filteredRowSet.getInt(1));
        assertTrue(filteredRowSet.relative(-1));
View Full Code Here

        assertTrue(filteredRowSet.relative(1));
        assertEquals(4, filteredRowSet.getInt(1));

        assertTrue(filteredRowSet.absolute(3));
        assertEquals(3, filteredRowSet.getInt(1));
        assertTrue(filteredRowSet.relative(-1));
        assertEquals(2, filteredRowSet.getInt(1));
        assertFalse(filteredRowSet.relative(-2));

        RangeOne range = new RangeOne();
        filteredRowSet.setFilter(range);
View Full Code Here

        assertTrue(filteredRowSet.absolute(3));
        assertEquals(3, filteredRowSet.getInt(1));
        assertTrue(filteredRowSet.relative(-1));
        assertEquals(2, filteredRowSet.getInt(1));
        assertFalse(filteredRowSet.relative(-2));

        RangeOne range = new RangeOne();
        filteredRowSet.setFilter(range);

        filteredRowSet.beforeFirst();
View Full Code Here

        RangeOne range = new RangeOne();
        filteredRowSet.setFilter(range);

        filteredRowSet.beforeFirst();
        assertTrue(filteredRowSet.relative(2));
        assertEquals(3, filteredRowSet.getInt(1));
        assertEquals(3, filteredRowSet.getRow());
        assertFalse(filteredRowSet.relative(-2));
        assertTrue(filteredRowSet.isBeforeFirst());
    }
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.