KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > sql > rowset > WebRowSet


1 /*
2  * @(#)WebRowSet.java 1.5 04/03/11
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.sql.rowset;
9
10 import java.sql.*;
11 import javax.sql.*;
12 import javax.naming.*;
13 import java.io.*;
14 import java.math.*;
15 import org.xml.sax.*;
16
17 /**
18  * The standard interface that all implementations of a <code>WebRowSet</code>
19  * must implement.
20  * <P>
21  * <h3>1.0 Overview</h3>
22  * The <code>WebRowSetImpl</code> provides the standard
23  * reference implementation, which may be extended if required.
24  * <P>
25  * The standard WebRowSet XML Schema definition is available at the following
26  * URI:
27  * <ul>
28  * <pre>
29  * <a HREF="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">http://java.sun.com/xml/ns/jdbc/webrowset.xsd</a>
30  * </pre>
31  * </ul>
32  * It describes the standard XML document format required when describing a
33  * <code>RowSet</code> object in XML and must be used be all standard implementations
34  * of the <code>WebRowSet</code> interface to ensure interoperability. In addition,
35  * the <code>WebRowSet</code> schema uses specific SQL/XML Schema annotations,
36  * thus ensuring greater cross
37  * platform inter-operability. This is an effort currently under way at the ISO
38  * organization. The SQL/XML definition is available at the following URI:
39  * <ul>
40  * <pre>
41  * <a HREF="http://standards.iso.org/iso/9075/2002/12/sqlxml">http://standards.iso.org/iso/9075/2002/12/sqlxml</a>
42  * </pre>
43  * </ul>
44  * The schema definition describes the internal data of a <code>RowSet</code> object
45  * in three distinct areas:
46  * <UL>
47  * <li><b>properties</b></li>
48  * These properties describe the standard synchronization provider properties in
49  * addition to the more general <code>RowSet</code> properties.
50  * <p>
51  * <li><b>metadata</b></li>
52  * This describes the metadata associated with the tabular structure governed by a
53  * <code>WebRowSet</code> object. The metadata described is closely aligned with the
54  * metadata accessible in the underlying <code>java.sql.ResultSet</code> interface.
55  * <p>
56  * <li><b>data</b></li>
57  * This describes the original data (the state of data since the last population
58  * or last synchronization of the <code>WebRowSet</code> object) and the current
59  * data. By keeping track of the delta between the original data and the current data,
60  * a <code>WebRowSet</code> maintains
61  * the ability to synchronize changes in its data back to the originating data source.
62  * </ul>
63  * <P>
64  * <h3>2.0 WebRowSet States</h3>
65  * The following sections demonstrates how a <code>WebRowSet</code> implementation
66  * should use the XML Schema to describe update, insert, and delete operations
67  * and to describe the state of a <code>WebRowSet</code> object in XML.
68  * <p>
69  * <h4>2.1 State 1 - Outputting a <code>WebRowSet</code> Object to XML</h3>
70  * In this example, a <code>WebRowSet</code> object is created and populated with a simple 2 column,
71  * 5 row table from a data source. Having the 5 rows in a <code>WebRowSet</code> object
72  * makes it possible to describe them in XML. The
73  * metadata describing the various standard JavaBeans properties as defined
74  * in the RowSet interface plus the standard properties defined in
75  * the <code>CachedRowSet</code><sup><font size=-2>TM</font></sup> interface
76  * provide key details that describe WebRowSet
77  * properties. Outputting the WebRowSet object to XML using the standard
78  * <code>writeXml</code> methods describes the internal properties as follows:
79  * <PRE>
80  * &lt;<font color=red>properties</font>&gt;
81  * &lt;<font color=red>command</font>&gt;select co1, col2 from test_table&lt;<font color=red>/command</font>&gt;
82  * &lt;<font color=red>concurrency</font>&gt;1&lt;<font color=red>/concurrency</font>&gt;
83  * &lt;<font color=red>datasource/</font>&gt;
84  * &lt;<font color=red>escape-processing</font>&gt;true&lt;<font color=red>/escape-processing</font>&gt;
85  * &lt;<font color=red>fetch-direction</font>&gt;0&lt;<font color=red>/fetch-direction</font>&gt;
86  * &lt;<font color=red>fetch-size</font>&gt;0&lt;<font color=red>/fetch-size</font>&gt;
87  * &lt;<font color=red>isolation-level</font>&gt;1&lt;<font color=red>/isolation-level</font>&gt;
88  * &lt;<font color=red>key-columns/</font>&gt;
89  * &lt;<font color=red>map/</font>&gt;
90  * &lt;<font color=red>max-field-size</font>&gt;0&lt;<font color=red>/max-field-size</font>&gt;
91  * &lt;<font color=red>max-rows</font>&gt;0&lt;<font color=red>/max-rows</font>&gt;
92  * &lt;<font color=red>query-timeout</font>&gt;0&lt;<font color=red>/query-timeout</font>&gt;
93  * &lt;<font color=red>read-only</font>&gt;false&lt;<font color=red>/read-only</font>&gt;
94  * &lt;<font color=red>rowset-type</font>&gt;TRANSACTION_READ_UNCOMMITED&lt;<font color=red>/rowset-type</font>&gt;
95  * &lt;<font color=red>show-deleted</font>&gt;false&lt;<font color=red>/show-deleted</font>&gt;
96  * &lt;<font color=red>table-name/</font>&gt;
97  * &lt;<font color=red>url</font>&gt;jdbc:thin:oracle&lt;<font color=red>/url</font>&gt;
98  * &lt;<font color=red>sync-provider</font>&gt;
99  * &lt;<font color=red>sync-provider-name</font>&gt;.com.rowset.provider.RIOptimisticProvider&lt;<font color=red>/sync-provider-name</font>&gt;
100  * &lt;<font color=red>sync-provider-vendor</font>&gt;Sun Microsystems&lt;<font color=red>/sync-provider-vendor</font>&gt;
101  * &lt;<font color=red>sync-provider-version</font>&gt;1.0&lt;<font color=red>/sync-provider-name</font>&gt;
102  * &lt;<font color=red>sync-provider-grade</font>&gt;LOW&lt;<font color=red>/sync-provider-grade</font>&gt;
103  * &lt;<font color=red>data-source-lock</font>&gt;NONE&lt;<font color=red>/data-source-lock</font>&gt;
104  * &lt;<font color=red>/sync-provider</font>&gt;
105  * &lt;<font color=red>/properties</font>&gt;
106  * </PRE>
107  * The meta-data describing the make up of the WebRowSet is described
108  * in XML as detailed below. Note both columns are described between the
109  * <code>column-definition</code> tags.
110  * <PRE>
111  * &lt;<font color=red>metadata</font>&gt;
112  * &lt;<font color=red>column-count</font>&gt;2&lt;<font color=red>/column-count</font>&gt;
113  * &lt;<font color=red>column-definition</font>&gt;
114  * &lt;<font color=red>column-index</font>&gt;1&lt;<font color=red>/column-index</font>&gt;
115  * &lt;<font color=red>auto-increment</font>&gt;false&lt;<font color=red>/auto-increment</font>&gt;
116  * &lt;<font color=red>case-sensitive</font>&gt;true&lt;<font color=red>/case-sensitive</font>&gt;
117  * &lt;<font color=red>currency</font>&gt;false&lt;<font color=red>/currency</font>&gt;
118  * &lt;<font color=red>nullable</font>&gt;1&lt;<font color=red>/nullable</font>&gt;
119  * &lt;<font color=red>signed</font>&gt;false&lt;<font color=red>/signed</font>&gt;
120  * &lt;<font color=red>searchable</font>&gt;true&lt;<font color=red>/searchable</font>&gt;
121  * &lt;<font color=red>column-display-size</font>&gt;10&lt;<font color=red>/column-display-size</font>&gt;
122  * &lt;<font color=red>column-label</font>&gt;COL1&lt;<font color=red>/column-label</font>&gt;
123  * &lt;<font color=red>column-name</font>&gt;COL1&lt;<font color=red>/column-name</font>&gt;
124  * &lt;<font color=red>schema-name/</font>&gt;
125  * &lt;<font color=red>column-precision</font>&gt;10&lt;<font color=red>/column-precision</font>&gt;
126  * &lt;<font color=red>column-scale</font>&gt;0&lt;<font color=red>/column-scale</font>&gt;
127  * &lt;<font color=red>table-name/</font>&gt;
128  * &lt;<font color=red>catalog-name/</font>&gt;
129  * &lt;<font color=red>column-type</font>&gt;1&lt;<font color=red>/column-type</font>&gt;
130  * &lt;<font color=red>column-type-name</font>&gt;CHAR&lt;<font color=red>/column-type-name</font>&gt;
131  * &lt;<font color=red>/column-definition</font>&gt;
132  * &lt;<font color=red>column-definition</font>&gt;
133  * &lt;<font color=red>column-index</font>&gt;2&lt;<font color=red>/column-index</font>&gt;
134  * &lt;<font color=red>auto-increment</font>&gt;false&lt;<font color=red>/auto-increment</font>&gt;
135  * &lt;<font color=red>case-sensitive</font>&gt;false&lt;<font color=red>/case-sensitive</font>&gt;
136  * &lt;<font color=red>currency</font>&gt;false&lt;<font color=red>/currency</font>&gt;
137  * &lt;<font color=red>nullable</font>&gt;1&lt;<font color=red>/nullable</font>&gt;
138  * &lt;<font color=red>signed</font>&gt;true&lt;<font color=red>/signed</font>&gt;
139  * &lt;<font color=red>searchable</font>&gt;true&lt;<font color=red>/searchable</font>&gt;
140  * &lt;<font color=red>column-display-size</font>&gt;39&lt;<font color=red>/column-display-size</font>&gt;
141  * &lt;<font color=red>column-label</font>&gt;COL2&lt;<font color=red>/column-label</font>&gt;
142  * &lt;<font color=red>column-name</font>&gt;COL2&lt;<font color=red>/column-name</font>&gt;
143  * &lt;<font color=red>schema-name/</font>&gt;
144  * &lt;<font color=red>column-precision</font>&gt;38&lt;<font color=red>/column-precision</font>&gt;
145  * &lt;<font color=red>column-scale</font>&gt;0&lt;<font color=red>/column-scale</font>&gt;
146  * &lt;<font color=red>table-name/</font>&gt;
147  * &lt;<font color=red>catalog-name/</font>&gt;
148  * &lt;<font color=red>column-type</font>&gt;3&lt;<font color=red>/column-type</font>&gt;
149  * &lt;<font color=red>column-type-name</font>&gt;NUMBER&lt;<font color=red>/column-type-name</font>&gt;
150  * &lt;<font color=red>/column-definition</font>&gt;
151  * &lt;<font color=red>/metadata</font>&gt;
152  * </PRE>
153  * Having detailed how the properties and metadata are described, the following details
154  * how the contents of a <code>WebRowSet</code> object is described in XML. Note, that
155  * this describes a <code>WebRowSet</code> object that has not undergone any
156  * modifications since its instantiation.
157  * A <code>currentRow</code> tag is mapped to each row of the table structure that the
158  * <code>WebRowSet</code> object provides. A <code>columnValue</code> tag may contain
159  * either the <code>stringData</code> or <code>binaryData</code> tag, according to
160  * the SQL type that
161  * the XML value is mapping back to. The <code>binaryData</code> tag contains data in the
162  * Base64 encoding and is typically used for <code>BLOB</code> and <code>CLOB</code> type data.
163  * <PRE>
164  * &lt;<font color=red>data</font>&gt;
165  * &lt;<font color=red>currentRow</font>&gt;
166  * &lt;<font color=red>columnValue</font>&gt;
167  * firstrow
168  * &lt;<font color=red>/columnValue</font>&gt;
169  * &lt;<font color=red>columnValue</font>&gt;
170  * 1
171  * &lt;<font color=red>/columnValue</font>&gt;
172  * &lt;<font color=red>/currentRow</font>&gt;
173  * &lt;<font color=red>currentRow</font>&gt;
174  * &lt;<font color=red>columnValue</font>&gt;
175  * secondrow
176  * &lt;<font color=red>/columnValue</font>&gt;
177  * &lt;<font color=red>columnValue</font>&gt;
178  * 2
179  * &lt;<font color=red>/columnValue</font>&gt;
180  * &lt;<font color=red>/currentRow</font>&gt;
181  * &lt;<font color=red>currentRow</font>&gt;
182  * &lt;<font color=red>columnValue</font>&gt;
183  * thirdrow
184  * &lt;<font color=red>/columnValue</font>&gt;
185  * &lt;<font color=red>columnValue</font>&gt;
186  * 3
187  * &lt;<font color=red>/columnValue</font>&gt;
188  * &lt;<font color=red>/currentRow</font>&gt;
189  * &lt;<font color=red>currentRow</font>&gt;
190  * &lt;<font color=red>columnValue</font>&gt;
191  * fourthrow
192  * &lt;<font color=red>/columnValue</font>&gt;
193  * &lt;<font color=red>columnValue</font>&gt;
194  * 4
195  * &lt;<font color=red>/columnValue</font>&gt;
196  * &lt;<font color=red>/currentRow</font>&gt;
197  * &lt;<font color=red>/data</font>&gt;
198  * </PRE>
199  * <h4>2.2 State 2 - Deleting a Row</h4>
200  * Deleting a row in a <code>WebRowSet</code> object involves simply moving to the row
201  * to be deleted and then calling the method <code>deleteRow</code>, as in any other
202  * <code>RowSet</code> object. The following
203  * two lines of code, in which <i>wrs</i> is a <code>WebRowSet</code> object, delete
204  * the third row.
205  * <PRE>
206  * wrs.absolute(3);
207  * wrs.deleteRow();
208  * </PRE>
209  * The XML description shows the third row is marked as a <code>deleteRow</code>,
210  * which eliminates the third row in the <code>WebRowSet</code> object.
211  * <PRE>
212  * &lt;<font color=red>data</font>&gt;
213  * &lt;<font color=red>currentRow</font>&gt;
214  * &lt;<font color=red>columnValue</font>&gt;
215  * firstrow
216  * &lt;<font color=red>/columnValue</font>&gt;
217  * &lt;<font color=red>columnValue</font>&gt;
218  * 1
219  * &lt;<font color=red>/columnValue</font>&gt;
220  * &lt;<font color=red>/currentRow</font>&gt;
221  * &lt;<font color=red>currentRow</font>&gt;
222  * &lt;<font color=red>columnValue</font>&gt;
223  * secondrow
224  * &lt;<font color=red>/columnValue</font>&gt;
225  * &lt;<font color=red>columnValue</font>&gt;
226  * 2
227  * &lt;<font color=red>/columnValue</font>&gt;
228  * &lt;<font color=red>/currentRow</font>&gt;
229  * &lt;<font color=red>deleteRow</font>&gt;
230  * &lt;<font color=red>columnValue</font>&gt;
231  * thirdrow
232  * &lt;<font color=red>/columnValue</font>&gt;
233  * &lt;<font color=red>columnValue</font>&gt;
234  * 3
235  * &lt;<font color=red>/columnValue</font>&gt;
236  * &lt;<font color=red>/deleteRow</font>&gt;
237  * &lt;<font color=red>currentRow</font>&gt;
238  * &lt;<font color=red>columnValue</font>&gt;
239  * fourthrow
240  * &lt;<font color=red>/columnValue</font>&gt;
241  * &lt;<font color=red>columnValue</font>&gt;
242  * 4
243  * &lt;<font color=red>/columnValue</font>&gt;
244  * &lt;<font color=red>/currentRow</font>&gt;
245  * &lt;<font color=red>/data</font>&gt;
246  * </PRE>
247  * <h4>2.3 State 3 - Inserting a Row</h4>
248  * A <codeWebRowSet</code> object can insert a new row by moving to the insert row,
249  * calling the appropriate updater methods for each column in the row, and then
250  * calling the method <code>insertRow</code>.
251  * <PRE>
252  * wrs.moveToInsertRow();
253  * wrs.updateString(1, "fifththrow");
254  * wrs.updateString(2, "5");
255  * wrs.insertRow();
256  * </PRE>
257  * The following code fragment changes the second column value in the row just inserted.
258  * Note that this code applies when new rows are inserted right after the current row,
259  * which is why the method <code>next</code> moves the cursor to the correct row.
260  * Calling the method <code>acceptChanges</code> writes the change to the data source.
261  *
262  * <PRE>
263  * wrs.moveToCurrentRow();
264  * wrs.next();
265  * wrs.updateString(2, "V");
266  * wrs.acceptChanges();
267  * :
268  * </PRE>
269  * Describing this in XML demonstrates where the Java code inserts a new row and then
270  * performs an update on the newly inserted row on an individual field.
271  * <PRE>
272  * &lt;<font color=red>data</font>&gt;
273  * &lt;<font color=red>currentRow</font>&gt;
274  * &lt;<font color=red>columnValue</font>&gt;
275  * firstrow
276  * &lt;<font color=red>/columnValue</font>&gt;
277  * &lt;<font color=red>columnValue</font>&gt;
278  * 1
279  * &lt;<font color=red>/columnValue</font>&gt;
280  * &lt;<font color=red>/currentRow</font>&gt;
281  * &lt;<font color=red>currentRow</font>&gt;
282  * &lt;<font color=red>columnValue</font>&gt;
283  * secondrow
284  * &lt;<font color=red>/columnValue</font>&gt;
285  * &lt;<font color=red>columnValue</font>&gt;
286  * 2
287  * &lt;<font color=red>/columnValue</font>&gt;
288  * &lt;<font color=red>/currentRow</font>&gt;
289  * &lt;<font color=red>currentRow</font>&gt;
290  * &lt;<font color=red>columnValue</font>&gt;
291  * newthirdrow
292  * &lt;<font color=red>/columnValue</font>&gt;
293  * &lt;<font color=red>columnValue</font>&gt;
294  * III
295  * &lt;<font color=red>/columnValue</font>&gt;
296  * &lt;<font color=red>/currentRow</font>&gt;
297  * &lt;<font color=red>insertRow</font>&gt;
298  * &lt;<font color=red>columnValue</font>&gt;
299  * fifthrow
300  * &lt;<font color=red>/columnValue</font>&gt;
301  * &lt;<font color=red>columnValue</font>&gt;
302  * 5
303  * &lt;<font color=red>/columnValue</font>&gt;
304  * &lt;<font color=red>updateValue</font>&gt;
305  * V
306  * &lt;<font color=red>/updateValue</font>&gt;
307  * &lt;<font color=red>/insertRow</font>&gt;
308  * &lt;<font color=red>currentRow</font>&gt;
309  * &lt;<font color=red>columnValue</font>&gt;
310  * fourthrow
311  * &lt;<font color=red>/columnValue</font>&gt;
312  * &lt;<font color=red>columnValue</font>&gt;
313  * 4
314  * &lt;<font color=red>/columnValue</font>&gt;
315  * &lt;<font color=red>/currentRow</font>&gt;
316  * &lt;<font color=red>/date</font>&gt;
317  * </PRE>
318  * <h4>2.4 State 4 - Modifying a Row</h4>
319  * Modifying a row produces specific XML that records both the new value and the
320  * value that was replaced. The value that was replaced becomes the original value,
321  * and the new value becomes the current value. The following
322  * code moves the cursor to a specific row, performs some modifications, and updates
323  * the row when complete.
324  * <PRE>
325  * wrs.absolute(5);
326  * wrs.updateString(1, "new4thRow");
327  * wrs.updateString(2, "IV");
328  * wrs.updateRow();
329  * </PRE>
330  * In XML, this is described by the <code>modifyRow</code> tag. Both the original and new
331  * values are contained within the tag for original row tracking purposes.
332  * <PRE>
333  * &lt;<font color=red>data</font>&gt;
334  * &lt;<font color=red>currentRow</font>&gt;
335  * &lt;<font color=red>columnValue</font>&gt;
336  * firstrow
337  * &lt;<font color=red>/columnValue</font>&gt;
338  * &lt;<font color=red>columnValue</font>&gt;
339  * 1
340  * &lt;<font color=red>/columnValue</font>&gt;
341  * &lt;<font color=red>/currentRow</font>&gt;
342  * &lt;<font color=red>currentRow</font>&gt;
343  * &lt;<font color=red>columnValue</font>&gt;
344  * secondrow
345  * &lt;<font color=red>/columnValue</font>&gt;
346  * &lt;<font color=red>columnValue</font>&gt;
347  * 2
348  * &lt;<font color=red>/columnValue</font>&gt;
349  * &lt;<font color=red>/currentRow</font>&gt;
350  * &lt;<font color=red>currentRow</font>&gt;
351  * &lt;<font color=red>columnValue</font>&gt;
352  * newthirdrow
353  * &lt;<font color=red>/columnValue</font>&gt;
354  * &lt;<font color=red>columnValue</font>&gt;
355  * III
356  * &lt;<font color=red>/columnValue</font>&gt;
357  * &lt;<font color=red>/currentRow</font>&gt;
358  * &lt;<font color=red>currentRow</font>&gt;
359  * &lt;<font color=red>columnValue</font>&gt;
360  * fifthrow
361  * &lt;<font color=red>/columnValue</font>&gt;
362  * &lt;<font color=red>columnValue</font>&gt;
363  * 5
364  * &lt;<font color=red>/columnValue</font>&gt;
365  * &lt;<font color=red>/currentRow</font>&gt;
366  * &lt;<font color=red>modifyRow</font>&gt;
367  * &lt;<font color=red>columnValue</font>&gt;
368  * fourthrow
369  * &lt;<font color=red>/columnValue</font>&gt;
370  * &lt;<font color=red>updateValue</font>&gt;
371  * new4thRow
372  * &lt;<font color=red>/updateValue</font>&gt;
373  * &lt;<font color=red>columnValue</font>&gt;
374  * 4
375  * &lt;<font color=red>/columnValue</font>&gt;
376  * &lt;<font color=red>updateValue</font>&gt;
377  * IV
378  * &lt;<font color=red>/updateValue</font>&gt;
379  * &lt;<font color=red>/modifyRow</font>&gt;
380  * &lt;<font color=red>/data</font>&gt;
381  * </PRE>
382  *
383  * @see javax.sql.rowset.JdbcRowSet
384  * @see javax.sql.rowset.CachedRowSet
385  * @see javax.sql.rowset.FilteredRowSet
386  * @see javax.sql.rowset.JoinRowSet
387  */

388
389 public interface WebRowSet extends CachedRowSet JavaDoc {
390
391    /**
392     * Reads a <code>WebRowSet</code> object in its XML format from the given
393     * <code>Reader</code> object.
394     *
395     * @param reader the <code>java.io.Reader</code> stream from which this
396     * <code>WebRowSet</code> object will be populated
397
398     * @throws SQLException if a database access error occurs
399     */

400     public void readXml(java.io.Reader JavaDoc reader) throws SQLException;
401
402     /**
403      * Reads a stream based XML input to populate this <code>WebRowSet</code>
404      * object.
405      *
406      * @param iStream the <code>java.io.InputStream</code> from which this
407      * <code>WebRowSet</code> object will be populated
408      * @throws SQLException if a data source access error occurs
409      * @throws IOException if an IO exception occurs
410      */

411     public void readXml(java.io.InputStream JavaDoc iStream) throws SQLException, IOException;
412
413    /**
414     * Populates this <code>WebRowSet</code> object with
415     * the contents of the given <code>ResultSet</code> object and writes its
416     * data, properties, and metadata
417     * to the given <code>Writer</code> object in XML format.
418     * <p>
419     * NOTE: The <code>WebRowSet</code> cursor may be moved to write out the
420     * contents to the XML data source. If implemented in this way, the cursor <b>must</b>
421     * be returned to its position just prior to the <code>writeXml()</code> call.
422     *
423     * @param rs the <code>ResultSet</code> object with which to populate this
424     * <code>WebRowSet</code> object
425     * @param writer the <code>java.io.Writer</code> object to write to.
426     * @throws SQLException if an error occurs writing out the rowset
427     * contents in XML format
428     */

429     public void writeXml(ResultSet rs, java.io.Writer JavaDoc writer) throws SQLException;
430
431    /**
432     * Populates this <code>WebRowSet</code> object with
433     * the contents of the given <code>ResultSet</code> object and writes its
434     * data, properties, and metadata
435     * to the given <code>OutputStream</code> object in XML format.
436     * <p>
437     * NOTE: The <code>WebRowSet</code> cursor may be moved to write out the
438     * contents to the XML data source. If implemented in this way, the cursor <b>must</b>
439     * be returned to its position just prior to the <code>writeXml()</code> call.
440     *
441     * @param rs the <code>ResultSet</code> object with which to populate this
442     * <code>WebRowSet</code> object
443     * @param oStream the <code>java.io.OutputStream</code> to write to
444     * @throws SQLException if a data source access error occurs
445     * @throws IOException if a IO exception occurs
446     */

447     public void writeXml(ResultSet rs, java.io.OutputStream JavaDoc oStream) throws SQLException, IOException;
448
449    /**
450     * Writes the data, properties, and metadata for this <code>WebRowSet</code> object
451     * to the given <code>Writer</code> object in XML format.
452     *
453     * @param writer the <code>java.io.Writer</code> stream to write to
454     * @throws SQLException if an error occurs writing out the rowset
455     * contents to XML
456     */

457     public void writeXml(java.io.Writer JavaDoc writer) throws SQLException;
458
459     /**
460      * Writes the data, properties, and metadata for this <code>WebRowSet</code> object
461      * to the given <code>OutputStream</code> object in XML format.
462      *
463      * @param oStream the <code>java.io.OutputStream</code> stream to write to
464      * @throws SQLException if a data source access error occurs
465      * @throws IOException if a IO exception occurs
466      */

467     public void writeXml(java.io.OutputStream JavaDoc oStream) throws SQLException, IOException;
468
469     /**
470      * The public identifier for the XML Schema definition that defines the XML
471      * tags and their valid values for a <code>WebRowSet</code> implementation.
472      */

473     public static String JavaDoc PUBLIC_XML_SCHEMA =
474     "--//Sun Microsystems, Inc.//XSD Schema//EN";
475
476     /**
477      * The URL for the XML Schema definition file that defines the XML tags and
478      * their valid values for a <code>WebRowSet</code> implementation.
479      */

480     public static String JavaDoc SCHEMA_SYSTEM_ID = "http://java.sun.com/xml/ns/jdbc/webrowset.xsd";
481 }
482
Popular Tags