Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.sql/share/classes/javax/sql/RowSetReader.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 facility that a disconnected {@code RowSet} object calls on
32
* to populate itself with rows of data. A reader (an object implementing the
33
* {@code RowSetReader} interface) may be registered with
34
* a {@code RowSet} object that supports the reader/writer paradigm.
35
* When the {@code RowSet} object's {@code execute} method is
36
* called, it in turn calls the reader's {@code readData} method.
37
*
38
* @since 1.4
39
*/
40
41
public interface RowSetReader {
42
43
/**
44
* Reads the new contents of the calling {@code RowSet} object.
45
* In order to call this method, a {@code RowSet}
46
* object must have implemented the {@code RowSetInternal} interface
47
* and registered this {@code RowSetReader} object as its reader.
48
* The {@code readData} method is invoked internally
49
* by the {@code RowSet.execute} method for rowsets that support the
50
* reader/writer paradigm.
51
*
52
* <P>The {@code readData} method adds rows to the caller.
53
* It can be implemented in a wide variety of ways and can even
54
* populate the caller with rows from a nonrelational data source.
55
* In general, a reader may invoke any of the rowset's methods,
56
* with one exception. Calling the method {@code execute} will
57
* cause an {@code SQLException} to be thrown
58
* because {@code execute} may not be called recursively. Also,
59
* when a reader invokes {@code RowSet} methods, no listeners
60
* are notified; that is, no {@code RowSetEvent} objects are
61
* generated and no {@code RowSetListener} methods are invoked.
62
* This is true because listeners are already being notified by the method
63
* {@code execute}.
64
*
65
* @param caller the {@code RowSet} object (1) that has implemented the
66
* {@code RowSetInternal} interface, (2) with which this reader is
67
* registered, and (3) whose {@code execute} method called this reader
68
* @throws SQLException if a database access error occurs or this method
69
* invokes the {@code RowSet.execute} method
70
*/
71
void readData(RowSetInternal caller) throws SQLException;
72
73
}
74
75