Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.sql/share/classes/javax/sql/RowSetInternal.java
41152 views
1
/*
2
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
10
*
11
* This code is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* version 2 for more details (a copy is included in the LICENSE file that
15
* accompanied this code).
16
*
17
* You should have received a copy of the GNU General Public License version
18
* 2 along with this work; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
*
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;
27
28
import java.sql.*;
29
30
/**
31
* The interface that a {@code RowSet} object implements in order to
32
* present itself to a {@code RowSetReader} or {@code RowSetWriter}
33
* object. The {@code RowSetInternal} interface contains
34
* methods that let the reader or writer access and modify the internal
35
* state of the rowset.
36
*
37
* @since 1.4
38
*/
39
40
public interface RowSetInternal {
41
42
/**
43
* Retrieves the parameters that have been set for this
44
* {@code RowSet} object's command.
45
*
46
* @return an array of the current parameter values for this {@code RowSet}
47
* object's command
48
* @throws SQLException if a database access error occurs
49
*/
50
Object[] getParams() throws SQLException;
51
52
/**
53
* Retrieves the {@code Connection} object that was passed to this
54
* {@code RowSet} object.
55
*
56
* @return the {@code Connection} object passed to the rowset
57
* or {@code null} if none was passed
58
* @throws SQLException if a database access error occurs
59
*/
60
Connection getConnection() throws SQLException;
61
62
/**
63
* Sets the given {@code RowSetMetaData} object as the
64
* {@code RowSetMetaData} object for this {@code RowSet}
65
* object. The {@code RowSetReader} object associated with the rowset
66
* will use {@code RowSetMetaData} methods to set the values giving
67
* information about the rowset's columns.
68
*
69
* @param md the {@code RowSetMetaData} object that will be set with
70
* information about the rowset's columns
71
*
72
* @throws SQLException if a database access error occurs
73
*/
74
void setMetaData(RowSetMetaData md) throws SQLException;
75
76
/**
77
* Retrieves a {@code ResultSet} object containing the original
78
* value of this {@code RowSet} object.
79
* <P>
80
* The cursor is positioned before the first row in the result set.
81
* Only rows contained in the result set returned by the method
82
* {@code getOriginal} are said to have an original value.
83
*
84
* @return the original value of the rowset
85
* @throws SQLException if a database access error occurs
86
*/
87
public ResultSet getOriginal() throws SQLException;
88
89
/**
90
* Retrieves a {@code ResultSet} object containing the original value
91
* of the current row only. If the current row has no original value,
92
* an empty result set is returned. If there is no current row,
93
* an exception is thrown.
94
*
95
* @return the original value of the current row as a {@code ResultSet}
96
* object
97
* @throws SQLException if a database access error occurs or this method
98
* is called while the cursor is on the insert row, before the
99
* first row, or after the last row
100
*/
101
public ResultSet getOriginalRow() throws SQLException;
102
103
}
104
105