src/java.sql/share/classes/javax/sql/RowSetInternal.java
author rriggs
Wed, 02 Oct 2019 13:57:03 -0400
changeset 58446 5c83830390ba
parent 47216 71c04702a3d5
permissions -rw-r--r--
8231663: Incorrect GPL header in some RMI/SQL package-info.java files Reviewed-by: bpb, iris, lancea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.sql;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.sql.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * The interface that a <code>RowSet</code> object implements in order to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * present itself to a <code>RowSetReader</code> or <code>RowSetWriter</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * object. The <code>RowSetInternal</code> interface contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * methods that let the reader or writer access and modify the internal
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * state of the rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
public interface RowSetInternal {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
   * Retrieves the parameters that have been set for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
   * <code>RowSet</code> object's command.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
   * @return an array of the current parameter values for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
   *         object's command
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
  Object[] getParams() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
   * Retrieves the <code>Connection</code> object that was passed to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
   * <code>RowSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
   * @return the <code>Connection</code> object passed to the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
   *      or <code>null</code> if none was passed
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
  Connection getConnection() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
   * Sets the given <code>RowSetMetaData</code> object as the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
   * <code>RowSetMetaData</code> object for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
   * object. The <code>RowSetReader</code> object associated with the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
   * will use <code>RowSetMetaData</code> methods to set the values giving
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
   * information about the rowset's columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
   * @param md the <code>RowSetMetaData</code> object that will be set with
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
   *        information about the rowset's columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
  void setMetaData(RowSetMetaData md) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
   * Retrieves a <code>ResultSet</code> object containing the original
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
   * value of this <code>RowSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
   * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
   * The cursor is positioned before the first row in the result set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
   * Only rows contained in the result set returned by the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
   * <code>getOriginal</code> are said to have an original value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
   * @return the original value of the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
  public ResultSet getOriginal() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
   * Retrieves a <code>ResultSet</code> object containing the original value
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
   * of the current row only.  If the current row has no original value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
   * an empty result set is returned. If there is no current row,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
   * an exception is thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
   * @return the original value of the current row as a <code>ResultSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
   *          object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
   * @exception SQLException if a database access error occurs or this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
   *           is called while the cursor is on the insert row, before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
   *           first row, or after the last row
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
  public ResultSet getOriginalRow() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
}