Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/sql/RowSetReader.java
38829 views
/*1* Copyright (c) 2000, 2001, 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</code> object calls on31* to populate itself with rows of data. A reader (an object implementing the32* <code>RowSetReader</code> interface) may be registered with33* a <code>RowSet</code> object that supports the reader/writer paradigm.34* When the <code>RowSet</code> object's <code>execute</code> method is35* called, it in turn calls the reader's <code>readData</code> method.36*37* @since 1.438*/3940public interface RowSetReader {4142/**43* Reads the new contents of the calling <code>RowSet</code> object.44* In order to call this method, a <code>RowSet</code>45* object must have implemented the <code>RowSetInternal</code> interface46* and registered this <code>RowSetReader</code> object as its reader.47* The <code>readData</code> method is invoked internally48* by the <code>RowSet.execute</code> method for rowsets that support the49* reader/writer paradigm.50*51* <P>The <code>readData</code> 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</code> will56* cause an <code>SQLException</code> to be thrown57* because <code>execute</code> may not be called recursively. Also,58* when a reader invokes <code>RowSet</code> methods, no listeners59* are notified; that is, no <code>RowSetEvent</code> objects are60* generated and no <code>RowSetListener</code> methods are invoked.61* This is true because listeners are already being notified by the method62* <code>execute</code>.63*64* @param caller the <code>RowSet</code> object (1) that has implemented the65* <code>RowSetInternal</code> interface, (2) with which this reader is66* registered, and (3) whose <code>execute</code> method called this reader67* @exception SQLException if a database access error occurs or this method68* invokes the <code>RowSet.execute</code> method69*/70void readData(RowSetInternal caller) throws SQLException;7172}737475