Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/sql/RowSetInternal.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 interface that a <code>RowSet</code> object implements in order to31* present itself to a <code>RowSetReader</code> or <code>RowSetWriter</code>32* object. The <code>RowSetInternal</code> 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</code> object's command.44*45* @return an array of the current parameter values for this <code>RowSet</code>46* object's command47* @exception SQLException if a database access error occurs48*/49Object[] getParams() throws SQLException;5051/**52* Retrieves the <code>Connection</code> object that was passed to this53* <code>RowSet</code> object.54*55* @return the <code>Connection</code> object passed to the rowset56* or <code>null</code> if none was passed57* @exception SQLException if a database access error occurs58*/59Connection getConnection() throws SQLException;6061/**62* Sets the given <code>RowSetMetaData</code> object as the63* <code>RowSetMetaData</code> object for this <code>RowSet</code>64* object. The <code>RowSetReader</code> object associated with the rowset65* will use <code>RowSetMetaData</code> methods to set the values giving66* information about the rowset's columns.67*68* @param md the <code>RowSetMetaData</code> object that will be set with69* information about the rowset's columns70*71* @exception SQLException if a database access error occurs72*/73void setMetaData(RowSetMetaData md) throws SQLException;7475/**76* Retrieves a <code>ResultSet</code> object containing the original77* value of this <code>RowSet</code> 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</code> are said to have an original value.82*83* @return the original value of the rowset84* @exception SQLException if a database access error occurs85*/86public ResultSet getOriginal() throws SQLException;8788/**89* Retrieves a <code>ResultSet</code> 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</code>95* object96* @exception 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