0N/A/*
2362N/A * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage javax.sql;
0N/A
0N/Aimport java.sql.*;
0N/A
0N/A/**
0N/A * The facility that a disconnected <code>RowSet</code> object calls on
0N/A * to populate itself with rows of data. A reader (an object implementing the
0N/A * <code>RowSetReader</code> interface) may be registered with
0N/A * a <code>RowSet</code> object that supports the reader/writer paradigm.
0N/A * When the <code>RowSet</code> object's <code>execute</code> method is
0N/A * called, it in turn calls the reader's <code>readData</code> method.
0N/A *
0N/A * @since 1.4
0N/A */
0N/A
0N/Apublic interface RowSetReader {
0N/A
0N/A /**
0N/A * Reads the new contents of the calling <code>RowSet</code> object.
0N/A * In order to call this method, a <code>RowSet</code>
0N/A * object must have implemented the <code>RowSetInternal</code> interface
0N/A * and registered this <code>RowSetReader</code> object as its reader.
0N/A * The <code>readData</code> method is invoked internally
0N/A * by the <code>RowSet.execute</code> method for rowsets that support the
0N/A * reader/writer paradigm.
0N/A *
0N/A * <P>The <code>readData</code> method adds rows to the caller.
0N/A * It can be implemented in a wide variety of ways and can even
0N/A * populate the caller with rows from a nonrelational data source.
0N/A * In general, a reader may invoke any of the rowset's methods,
0N/A * with one exception. Calling the method <code>execute</code> will
0N/A * cause an <code>SQLException</code> to be thrown
0N/A * because <code>execute</code> may not be called recursively. Also,
0N/A * when a reader invokes <code>RowSet</code> methods, no listeners
0N/A * are notified; that is, no <code>RowSetEvent</code> objects are
0N/A * generated and no <code>RowSetListener</code> methods are invoked.
0N/A * This is true because listeners are already being notified by the method
0N/A * <code>execute</code>.
0N/A *
0N/A * @param caller the <code>RowSet</code> object (1) that has implemented the
0N/A * <code>RowSetInternal</code> interface, (2) with which this reader is
0N/A * registered, and (3) whose <code>execute</code> method called this reader
0N/A * @exception SQLException if a database access error occurs or this method
0N/A * invokes the <code>RowSet.execute</code> method
0N/A */
0N/A void readData(RowSetInternal caller) throws SQLException;
0N/A
0N/A}