Package javax.sql.rowset

Examples of javax.sql.rowset.WebRowSet.writeXml()


        webRs.populate(rs);

        webRs.absolute(3);
        webRs.updateString(2, "update3");

        webRs.writeXml(strWriter);

        assertTrue(webRs.isAfterLast());

        Document doc = getDocument(strWriter);
View Full Code Here


        assertData(doc, webRs);

        webRs.updateRow();

        strWriter = new StringWriter();
        webRs.writeXml(strWriter);

        assertTrue(webRs.isAfterLast());

        doc = getDocument(strWriter);
View Full Code Here

        webRs.moveToInsertRow();
        webRs.updateString(2, "update3");
        webRs.updateInt(4, 3);
        webRs.moveToCurrentRow();

        webRs.writeXml(strWriter);

        assertTrue(webRs.isAfterLast());

        Document doc = getDocument(strWriter);
View Full Code Here

        webRs.next();
        webRs.updateString(2, "update5");
        webRs.updateInt(1, 6);

        strWriter = new StringWriter();
        webRs.writeXml(strWriter);

        assertTrue(webRs.isAfterLast());

        doc = getDocument(strWriter);
View Full Code Here

        webRs.absolute(3);
        webRs.deleteRow();

        assertEquals(0, webRs.getRow());

        webRs.writeXml(strWriter);

        assertTrue(webRs.isAfterLast());

        Document doc = getDocument(strWriter);
View Full Code Here

        webRs.absolute(3);
        webRs.updateString(2, "update3");

        webRs.deleteRow();

        webRs.writeXml(strWriter);

        assertTrue(webRs.isAfterLast());

        Document doc = getDocument(strWriter);
View Full Code Here

        webRs.updateRow();

        webRs.deleteRow();

        strWriter = new StringWriter();
        webRs.writeXml(strWriter);

        assertTrue(webRs.isAfterLast());

        doc = getDocument(strWriter);
View Full Code Here

    public void testWriteXML_NotInitial() throws Exception {
        WebRowSet webRs = newWebRowSet();

        try {
            webRs.writeXml(strWriter);
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected
        }
View Full Code Here

            // expected
        }

        Writer writer = null;
        try {
            webRs.writeXml(writer);
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected
        }
    }
View Full Code Here

    public void testWriteXML_ResultSet() throws Exception {
        WebRowSet webRs = newWebRowSet();
        rs = st.executeQuery("SELECT * FROM USER_INFO");

        webRs.writeXml(rs, strWriter);

        /*
         * TODO spec says the cursor should move to previous position after
         * writing. However, RI doesn't. Harmony follows spec
         */
 
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.