Package javax.sql.rowset

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


        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

        webRs.absolute(2);

        rs = st.executeQuery("SELECT * FROM USER_INFO");
        strWriter = new StringWriter();
        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

        preStmt.close();

        WebRowSet webRs = newWebRowSet();
        rs = st.executeQuery("SELECT * FROM USER_INFO");
        webRs.populate(rs);
        webRs.writeXml(strWriter);
        assertTrue(webRs.last());
        assertEquals(unicodeChar, webRs.getString(2));
        assertFalse(-1 == strWriter.toString().indexOf(unicodeChar));

        WebRowSet webRs2 = newWebRowSet();
View Full Code Here

        // register listener
        Listener listener = new Listener();
        webRs.addRowSetListener(listener);
        assertNull(listener.getTag());
        // write to StringWriter
        webRs.writeXml(strWriter);
        webRs.beforeFirst();
        // read from StringWriter
        webRs.readXml(new StringReader(strWriter.toString()));
        isMetaDataEquals(meta, webRs.getMetaData());
        webRs.beforeFirst();
View Full Code Here

        webRs.updateInt(1, 77);
        webRs.updateString(2, "insert77");
        webRs.insertRow();
        webRs.moveToCurrentRow();

        webRs.writeXml(strWriter);

        Document doc = getDocument(strWriter);
        assertProperties(doc, webRs);
        assertMetadata(doc, webRs);
        assertData(doc, webRs);
View Full Code Here

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

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

        doc = getDocument(strWriter);
        assertProperties(doc, webRs);
        assertMetadata(doc, webRs);
        assertData(doc, webRs);
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.