Package javax.sql.rowset

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


        WebRowSet webRs = newWebRowSet();
        Reader fileReader = new FileReader(XML_SRC_URL_INVALID_HEADER);
        webRs.readXml(fileReader);

        StringWriter strWriter = new StringWriter();
        webRs.writeXml(strWriter);
        assertFalse(-1 == strWriter.toString().indexOf(
                "http://java.sun.com/xml/ns/jdbc"));
        assertFalse(-1 == strWriter.toString().indexOf(
                "http://www.w3.org/2001/XMLSchema-instance"));
    }
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

        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

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.