21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javax.sql.rowset;
27
28 import java.sql.*;
29 import javax.sql.*;
30 import javax.naming.*;
31 import java.io.*;
32 import java.math.*;
33 import java.io.*;
34
35 /**
36 * The standard interface that all standard implementations of
37 * <code>JdbcRowSet</code> must implement.
38 *
39 * <h2>1.0 Overview</h2>
40 * A wrapper around a <code>ResultSet</code> object that makes it possible
41 * to use the result set as a JavaBeans™
42 * component. Thus, a <code>JdbcRowSet</code> object can be one of the Beans that
43 * a tool makes available for composing an application. Because
44 * a <code>JdbcRowSet</code> is a connected rowset, that is, it continually
45 * maintains its connection to a database using a JDBC technology-enabled
46 * driver, it also effectively makes the driver a JavaBeans component.
47 * <P>
48 * Because it is always connected to its database, an instance of
49 * <code>JdbcRowSet</code>
50 * can simply take calls invoked on it and in turn call them on its
51 * <code>ResultSet</code> object. As a consequence, a result set can, for
52 * example, be a component in a Swing application.
53 * <P>
54 * Another advantage of a <code>JdbcRowSet</code> object is that it can be
55 * used to make a <code>ResultSet</code> object scrollable and updatable. All
56 * <code>RowSet</code> objects are by default scrollable and updatable. If
57 * the driver and database being used do not support scrolling and/or updating
58 * of result sets, an application can populate a <code>JdbcRowSet</code> object
59 * with the data of a <code>ResultSet</code> object and then operate on the
60 * <code>JdbcRowSet</code> object as if it were the <code>ResultSet</code>
61 * object.
96 * and then invokes the method <code>execute</code>.
97 * <PRE>
98 * JdbcRowSetImpl jrs = new JdbcRowSetImpl();
99 * jrs.setCommand("SELECT * FROM TITLES WHERE TYPE = ?");
100 * jrs.setURL("jdbc:myDriver:myAttribute");
101 * jrs.setUsername("cervantes");
102 * jrs.setPassword("sancho");
103 * jrs.setString(1, "BIOGRAPHY");
104 * jrs.execute();
105 * </PRE>
106 * The variable <code>jrs</code> now represents an instance of
107 * <code>JdbcRowSetImpl</code> that is a thin wrapper around the
108 * <code>ResultSet</code> object containing all the rows in the
109 * table <code>TITLES</code> where the type of book is biography.
110 * At this point, operations called on <code>jrs</code> will
111 * affect the rows in the result set, which is effectively a JavaBeans
112 * component.
113 * <P>
114 * The implementation of the <code>RowSet</code> method <code>execute</code> in the
115 * <code>JdbcRowSet</code> reference implementation differs from that in the
116 * <code>CachedRowSet</code>™
117 * reference implementation to account for the different
118 * requirements of connected and disconnected <code>RowSet</code> objects.
119 *
120 * @author Jonathan Bruce
121 * @since 1.5
122 */
123
124 public interface JdbcRowSet extends RowSet, Joinable {
125
126 /**
127 * Retrieves a <code>boolean</code> indicating whether rows marked
128 * for deletion appear in the set of current rows. If <code>true</code> is
129 * returned, deleted rows are visible with the current rows. If
130 * <code>false</code> is returned, rows are not visible with the set of
131 * current rows. The default value is <code>false</code>.
132 * <P>
133 * Standard rowset implementations may choose to restrict this behavior
134 * for security considerations or for certain deployment
135 * scenarios. The visibility of deleted rows is implementation-defined
136 * and does not represent standard behavior.
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javax.sql.rowset;
27
28 import java.sql.*;
29 import javax.sql.*;
30 import javax.naming.*;
31 import java.io.*;
32 import java.math.*;
33 import java.io.*;
34
35 /**
36 * The standard interface that all standard implementations of
37 * <code>JdbcRowSet</code> must implement.
38 *
39 * <h2>1.0 Overview</h2>
40 * A wrapper around a <code>ResultSet</code> object that makes it possible
41 * to use the result set as a JavaBeans
42 * component. Thus, a <code>JdbcRowSet</code> object can be one of the Beans that
43 * a tool makes available for composing an application. Because
44 * a <code>JdbcRowSet</code> is a connected rowset, that is, it continually
45 * maintains its connection to a database using a JDBC technology-enabled
46 * driver, it also effectively makes the driver a JavaBeans component.
47 * <P>
48 * Because it is always connected to its database, an instance of
49 * <code>JdbcRowSet</code>
50 * can simply take calls invoked on it and in turn call them on its
51 * <code>ResultSet</code> object. As a consequence, a result set can, for
52 * example, be a component in a Swing application.
53 * <P>
54 * Another advantage of a <code>JdbcRowSet</code> object is that it can be
55 * used to make a <code>ResultSet</code> object scrollable and updatable. All
56 * <code>RowSet</code> objects are by default scrollable and updatable. If
57 * the driver and database being used do not support scrolling and/or updating
58 * of result sets, an application can populate a <code>JdbcRowSet</code> object
59 * with the data of a <code>ResultSet</code> object and then operate on the
60 * <code>JdbcRowSet</code> object as if it were the <code>ResultSet</code>
61 * object.
96 * and then invokes the method <code>execute</code>.
97 * <PRE>
98 * JdbcRowSetImpl jrs = new JdbcRowSetImpl();
99 * jrs.setCommand("SELECT * FROM TITLES WHERE TYPE = ?");
100 * jrs.setURL("jdbc:myDriver:myAttribute");
101 * jrs.setUsername("cervantes");
102 * jrs.setPassword("sancho");
103 * jrs.setString(1, "BIOGRAPHY");
104 * jrs.execute();
105 * </PRE>
106 * The variable <code>jrs</code> now represents an instance of
107 * <code>JdbcRowSetImpl</code> that is a thin wrapper around the
108 * <code>ResultSet</code> object containing all the rows in the
109 * table <code>TITLES</code> where the type of book is biography.
110 * At this point, operations called on <code>jrs</code> will
111 * affect the rows in the result set, which is effectively a JavaBeans
112 * component.
113 * <P>
114 * The implementation of the <code>RowSet</code> method <code>execute</code> in the
115 * <code>JdbcRowSet</code> reference implementation differs from that in the
116 * <code>CachedRowSet</code>
117 * reference implementation to account for the different
118 * requirements of connected and disconnected <code>RowSet</code> objects.
119 *
120 * @author Jonathan Bruce
121 * @since 1.5
122 */
123
124 public interface JdbcRowSet extends RowSet, Joinable {
125
126 /**
127 * Retrieves a <code>boolean</code> indicating whether rows marked
128 * for deletion appear in the set of current rows. If <code>true</code> is
129 * returned, deleted rows are visible with the current rows. If
130 * <code>false</code> is returned, rows are not visible with the set of
131 * current rows. The default value is <code>false</code>.
132 * <P>
133 * Standard rowset implementations may choose to restrict this behavior
134 * for security considerations or for certain deployment
135 * scenarios. The visibility of deleted rows is implementation-defined
136 * and does not represent standard behavior.
|