Path: blob/master/src/java.sql/share/classes/javax/sql/RowSetReader.java
41152 views
/*1* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.sql;2627import java.sql.*;2829/**30* The facility that a disconnected {@code RowSet} object calls on31* to populate itself with rows of data. A reader (an object implementing the32* {@code RowSetReader} interface) may be registered with33* a {@code RowSet} object that supports the reader/writer paradigm.34* When the {@code RowSet} object's {@code execute} method is35* called, it in turn calls the reader's {@code readData} method.36*37* @since 1.438*/3940public interface RowSetReader {4142/**43* Reads the new contents of the calling {@code RowSet} object.44* In order to call this method, a {@code RowSet}45* object must have implemented the {@code RowSetInternal} interface46* and registered this {@code RowSetReader} object as its reader.47* The {@code readData} method is invoked internally48* by the {@code RowSet.execute} method for rowsets that support the49* reader/writer paradigm.50*51* <P>The {@code readData} method adds rows to the caller.52* It can be implemented in a wide variety of ways and can even53* populate the caller with rows from a nonrelational data source.54* In general, a reader may invoke any of the rowset's methods,55* with one exception. Calling the method {@code execute} will56* cause an {@code SQLException} to be thrown57* because {@code execute} may not be called recursively. Also,58* when a reader invokes {@code RowSet} methods, no listeners59* are notified; that is, no {@code RowSetEvent} objects are60* generated and no {@code RowSetListener} methods are invoked.61* This is true because listeners are already being notified by the method62* {@code execute}.63*64* @param caller the {@code RowSet} object (1) that has implemented the65* {@code RowSetInternal} interface, (2) with which this reader is66* registered, and (3) whose {@code execute} method called this reader67* @throws SQLException if a database access error occurs or this method68* invokes the {@code RowSet.execute} method69*/70void readData(RowSetInternal caller) throws SQLException;7172}737475