Path: blob/master/src/java.sql/share/classes/javax/sql/RowSetInternal.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 interface that a {@code RowSet} object implements in order to31* present itself to a {@code RowSetReader} or {@code RowSetWriter}32* object. The {@code RowSetInternal} interface contains33* methods that let the reader or writer access and modify the internal34* state of the rowset.35*36* @since 1.437*/3839public interface RowSetInternal {4041/**42* Retrieves the parameters that have been set for this43* {@code RowSet} object's command.44*45* @return an array of the current parameter values for this {@code RowSet}46* object's command47* @throws SQLException if a database access error occurs48*/49Object[] getParams() throws SQLException;5051/**52* Retrieves the {@code Connection} object that was passed to this53* {@code RowSet} object.54*55* @return the {@code Connection} object passed to the rowset56* or {@code null} if none was passed57* @throws SQLException if a database access error occurs58*/59Connection getConnection() throws SQLException;6061/**62* Sets the given {@code RowSetMetaData} object as the63* {@code RowSetMetaData} object for this {@code RowSet}64* object. The {@code RowSetReader} object associated with the rowset65* will use {@code RowSetMetaData} methods to set the values giving66* information about the rowset's columns.67*68* @param md the {@code RowSetMetaData} object that will be set with69* information about the rowset's columns70*71* @throws SQLException if a database access error occurs72*/73void setMetaData(RowSetMetaData md) throws SQLException;7475/**76* Retrieves a {@code ResultSet} object containing the original77* value of this {@code RowSet} object.78* <P>79* The cursor is positioned before the first row in the result set.80* Only rows contained in the result set returned by the method81* {@code getOriginal} are said to have an original value.82*83* @return the original value of the rowset84* @throws SQLException if a database access error occurs85*/86public ResultSet getOriginal() throws SQLException;8788/**89* Retrieves a {@code ResultSet} object containing the original value90* of the current row only. If the current row has no original value,91* an empty result set is returned. If there is no current row,92* an exception is thrown.93*94* @return the original value of the current row as a {@code ResultSet}95* object96* @throws SQLException if a database access error occurs or this method97* is called while the cursor is on the insert row, before the98* first row, or after the last row99*/100public ResultSet getOriginalRow() throws SQLException;101102}103104105