01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * published by the Free Software Foundation; either version 2.1 of
10: * the License, or (at your option) any later version.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this software; if not, write to the Free
19: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21: */
22: package javax.sql;
23:
24: import java.sql.*;
25:
26: /**
27: * A rowset object presents itself to a reader or writer as an instance of RowSetInternal.
28: * The RowSetInternal interface contains additional methods that let the reader or writer access
29: * and modify the internal state of the rowset.
30: */
31: public interface RowSetInternal {
32:
33: /**
34: * Get the Connection passed to the rowset.
35: *
36: * @return the Connection passed to the rowset, or null if none
37: * @exception SQLException - if a database-access error occurs.
38: */
39: public Connection getConnection() throws SQLException;
40:
41: /**
42: * Returns a result set containing the original value of the rowset. The cursor is positioned before the
43: * first row in the result set. Only rows contained in the result set returned by getOriginal() are said to
44: * have an original value.
45: *
46: * @return the original value of the rowset
47: * @exception SQLException - if a database-access error occurs.
48: */
49: public ResultSet getOriginal() throws SQLException;
50:
51: /**
52: * Returns a result set containing the original value of the current row. If the current row has no original
53: * value an empty result set is returned. If there is no current row a SQLException is thrown.
54: *
55: * @return the original value of the row
56: * @exception SQLException - if a database-access error occurs.
57: */
58: public ResultSet getOriginalRow() throws SQLException;
59:
60: /**
61: * Get the parameters that were set on the rowset.
62: *
63: * @return an array of parameters
64: * @exception SQLException - if a database-access error occurs.
65: */
66: public Object[] getParams() throws SQLException;
67:
68: /**
69: * Set the rowset's metadata.
70: *
71: * @param rowSetMetaData - metadata object
72: * @exception SQLException - if a database-access error occurs.
73: */
74: public void setMetaData(RowSetMetaData rowSetMetaData)
75: throws SQLException;
76: }
|