KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > sql > RowSetInternal


1 /*
2  * @(#)RowSetInternal.java 1.9 03/12/19
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;
9
10 import java.sql.*;
11
12 /**
13  * The interface that a <code>RowSet</code> object implements in order to
14  * present itself to a <code>RowSetReader</code> or <code>RowSetWriter</code>
15  * object. The <code>RowSetInternal</code> interface contains
16  * methods that let the reader or writer access and modify the internal
17  * state of the rowset.
18  *
19  * @since 1.4
20  */

21
22 public interface RowSetInternal {
23
24   /**
25    * Retrieves the parameters that have been set for this
26    * <code>RowSet</code> object's command.
27    *
28    * @return an array of the current parameter values for this <code>RowSet</code>
29    * object's command
30    * @exception SQLException if a database access error occurs
31    */

32   Object JavaDoc[] getParams() throws SQLException;
33
34   /**
35    * Retrieves the <code>Connection</code> object that was passed to this
36    * <code>RowSet</code> object.
37    *
38    * @return the <code>Connection</code> object passed to the rowset
39    * or <code>null</code> if none was passed
40    * @exception SQLException if a database access error occurs
41    */

42   Connection getConnection() throws SQLException;
43
44   /**
45    * Sets the given <code>RowSetMetaData</code> object as the
46    * <code>RowSetMetaData</code> object for this <code>RowSet</code>
47    * object. The <code>RowSetReader</code> object associated with the rowset
48    * will use <code>RowSetMetaData</code> methods to set the values giving
49    * information about the rowset's columns.
50    *
51    * @param md the <code>RowSetMetaData</code> object that will be set with
52    * information about the rowset's columns
53    *
54    * @exception SQLException if a database access error occurs
55    */

56   void setMetaData(RowSetMetaData JavaDoc md) throws SQLException;
57
58   /**
59    * Retrieves a <code>ResultSet</code> object containing the original
60    * value of this <code>RowSet</code> object.
61    * <P>
62    * The cursor is positioned before the first row in the result set.
63    * Only rows contained in the result set returned by the method
64    * <code>getOriginal</code> are said to have an original value.
65    *
66    * @return the original value of the rowset
67    * @exception SQLException if a database access error occurs
68    */

69   public ResultSet getOriginal() throws SQLException;
70
71   /**
72    * Retrieves a <code>ResultSet</code> object containing the original value
73    * of the current row only. If the current row has no original value,
74    * an empty result set is returned. If there is no current row,
75    * an exception is thrown.
76    *
77    * @return the original value of the current row as a <code>ResultSet</code>
78    * object
79    * @exception SQLException if a database access error occurs or this method
80    * is called while the cursor is on the insert row, before the
81    * first row, or after the last row
82    */

83   public ResultSet getOriginalRow() throws SQLException;
84
85 }
86
87
88
89
90
91
Popular Tags