home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / sql / ResultSet.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  47.3 KB  |  1,454 lines

  1. /*
  2.  * @(#)ResultSet.java    1.12 98/03/18
  3.  *
  4.  * Copyright 1996-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.sql;
  16.  
  17. import java.math.BigDecimal;
  18.  
  19. /**
  20.  * <P>A ResultSet provides access to a table of data generated by
  21.  * executing a Statement. The table rows are retrieved in
  22.  * sequence. Within a row its column values can be accessed in any
  23.  * order.
  24.  * 
  25.  * <P>A ResultSet maintains a cursor pointing to its current row of
  26.  * data.  Initially the cursor is positioned before the first row.
  27.  * The 'next' method moves the cursor to the next row.
  28.  *
  29.  * <P>The getXXX methods retrieve column values for the current
  30.  * row.  You can retrieve values either using the index number of the
  31.  * column, or by using the name of the column.  In general using the 
  32.  * column index will be more efficient.  Columns are numbered from 1.
  33.  *
  34.  * <P>For maximum portability, ResultSet columns within each row should be
  35.  * read in left-to-right order and each column should be read only once.
  36.  *
  37.  * <P>For the getXXX methods, the JDBC driver attempts to convert the
  38.  * underlying data to the specified Java type and returns a suitable
  39.  * Java value.  See the JDBC specification for allowable mappings
  40.  * from SQL types to Java types with the ResultSet.getXXX methods.
  41.  *
  42.  * <P>Column names used as input to getXXX methods are case
  43.  * insensitive.  When performing a getXXX using a column name, if
  44.  * several columns have the same name, then the value of the first
  45.  * matching column will be returned. The column name option is
  46.  * designed to be used when column names are used in the SQL
  47.  * query. For columns that are NOT explicitly named in the query, it
  48.  * is best to use column numbers. If column names were used there is
  49.  * no way for the programmer to guarantee that they actually refer to
  50.  * the intended columns.
  51.  *
  52.  * <P>A ResultSet is automatically closed by the Statement that
  53.  * generated it when that Statement is closed, re-executed, or is used
  54.  * to retrieve the next result from a sequence of multiple results.
  55.  * 
  56.  * <P>The number, types and properties of a ResultSet's columns are
  57.  * provided by the ResulSetMetaData object returned by the getMetaData
  58.  * method.
  59.  *
  60.  * @see Statement#executeQuery 
  61.  * @see Statement#getResultSet 
  62.  * @see ResultSetMetaData 
  63.  */
  64.  
  65. public interface ResultSet {
  66.  
  67.     /**
  68.      * A ResultSet is initially positioned before its first row; the
  69.      * first call to next makes the first row the current row; the
  70.      * second call makes the second row the current row, etc. 
  71.      *
  72.      * <P>If an input stream from the previous row is open, it is
  73.      * implicitly closed. The ResultSet's warning chain is cleared
  74.      * when a new row is read.
  75.      *
  76.      * @return true if the new current row is valid; false if there
  77.      * are no more rows 
  78.      * @exception SQLException if a database-access error occurs.
  79.      */
  80.     boolean next() throws SQLException;
  81.  
  82.  
  83.     /**
  84.      * In some cases, it is desirable to immediately release a
  85.      * ResultSet's database and JDBC resources instead of waiting for
  86.      * this to happen when it is automatically closed; the close
  87.      * method provides this immediate release.
  88.      *
  89.      * <P><B>Note:</B> A ResultSet is automatically closed by the
  90.      * Statement that generated it when that Statement is closed,
  91.      * re-executed, or is used to retrieve the next result from a
  92.      * sequence of multiple results. A ResultSet is also automatically
  93.      * closed when it is garbage collected.  
  94.      *
  95.      * @exception SQLException if a database-access error occurs.
  96.      */
  97.     void close() throws SQLException;
  98.  
  99.     /**
  100.      * A column may have the value of SQL NULL; wasNull reports whether
  101.      * the last column read had this special value.
  102.      * Note that you must first call getXXX on a column to try to read
  103.      * its value and then call wasNull() to find if the value was
  104.      * the SQL NULL.
  105.      *
  106.      * @return true if last column read was SQL NULL
  107.      * @exception SQLException if a database-access error occurs.
  108.      */
  109.     boolean wasNull() throws SQLException;
  110.     
  111.     //======================================================================
  112.     // Methods for accessing results by column index
  113.     //======================================================================
  114.  
  115.     /**
  116.      * Get the value of a column in the current row as a Java String.
  117.      *
  118.      * @param columnIndex the first column is 1, the second is 2, ...
  119.      * @return the column value; if the value is SQL NULL, the result is null
  120.      * @exception SQLException if a database-access error occurs.
  121.      */
  122.     String getString(int columnIndex) throws SQLException;
  123.  
  124.     /**
  125.      * Get the value of a column in the current row as a Java boolean.
  126.      *
  127.      * @param columnIndex the first column is 1, the second is 2, ...
  128.      * @return the column value; if the value is SQL NULL, the result is false
  129.      * @exception SQLException if a database-access error occurs.
  130.      */
  131.     boolean getBoolean(int columnIndex) throws SQLException;
  132.  
  133.     /**
  134.      * Get the value of a column in the current row as a Java byte.
  135.      *
  136.      * @param columnIndex the first column is 1, the second is 2, ...
  137.      * @return the column value; if the value is SQL NULL, the result is 0
  138.      * @exception SQLException if a database-access error occurs.
  139.      */
  140.     byte getByte(int columnIndex) throws SQLException;
  141.  
  142.     /**
  143.      * Get the value of a column in the current row as a Java short.
  144.      *
  145.      * @param columnIndex the first column is 1, the second is 2, ...
  146.      * @return the column value; if the value is SQL NULL, the result is 0
  147.      * @exception SQLException if a database-access error occurs.
  148.      */
  149.     short getShort(int columnIndex) throws SQLException;
  150.  
  151.     /**
  152.      * Get the value of a column in the current row as a Java int.
  153.      *
  154.      * @param columnIndex the first column is 1, the second is 2, ...
  155.      * @return the column value; if the value is SQL NULL, the result is 0
  156.      * @exception SQLException if a database-access error occurs.
  157.      */
  158.     int getInt(int columnIndex) throws SQLException;
  159.  
  160.     /**
  161.      * Get the value of a column in the current row as a Java long.
  162.      *
  163.      * @param columnIndex the first column is 1, the second is 2, ...
  164.      * @return the column value; if the value is SQL NULL, the result is 0
  165.      * @exception SQLException if a database-access error occurs.
  166.      */
  167.     long getLong(int columnIndex) throws SQLException;
  168.  
  169.     /**
  170.      * Get the value of a column in the current row as a Java float.
  171.      *
  172.      * @param columnIndex the first column is 1, the second is 2, ...
  173.      * @return the column value; if the value is SQL NULL, the result is 0
  174.      * @exception SQLException if a database-access error occurs.
  175.      */
  176.     float getFloat(int columnIndex) throws SQLException;
  177.  
  178.     /**
  179.      * Get the value of a column in the current row as a Java double.
  180.      *
  181.      * @param columnIndex the first column is 1, the second is 2, ...
  182.      * @return the column value; if the value is SQL NULL, the result is 0
  183.      * @exception SQLException if a database-access error occurs.
  184.      */
  185.     double getDouble(int columnIndex) throws SQLException;
  186.  
  187.     /**
  188.      * Get the value of a column in the current row as a java.lang.BigDecimal object.
  189.      *
  190.      * @param columnIndex the first column is 1, the second is 2, ...
  191.      * @param scale the number of digits to the right of the decimal
  192.      * @return the column value; if the value is SQL NULL, the result is null
  193.      * @exception SQLException if a database-access error occurs.
  194.      */
  195.     BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException;
  196.  
  197.     /**
  198.      * Get the value of a column in the current row as a Java byte array.
  199.      * The bytes represent the raw values returned by the driver.
  200.      *
  201.      * @param columnIndex the first column is 1, the second is 2, ...
  202.      * @return the column value; if the value is SQL NULL, the result is null
  203.      * @exception SQLException if a database-access error occurs.
  204.      */
  205.     byte[] getBytes(int columnIndex) throws SQLException;
  206.  
  207.     /**
  208.      * Get the value of a column in the current row as a java.sql.Date object.
  209.      *
  210.      * @param columnIndex the first column is 1, the second is 2, ...
  211.      * @return the column value; if the value is SQL NULL, the result is null
  212.      * @exception SQLException if a database-access error occurs.
  213.      */
  214.     java.sql.Date getDate(int columnIndex) throws SQLException;
  215.  
  216.     /**
  217.      * Get the value of a column in the current row as a java.sql.Time object.
  218.      *
  219.      * @param columnIndex the first column is 1, the second is 2, ...
  220.      * @return the column value; if the value is SQL NULL, the result is null
  221.      * @exception SQLException if a database-access error occurs.
  222.      */
  223.     java.sql.Time getTime(int columnIndex) throws SQLException;
  224.  
  225.     /**
  226.      * Get the value of a column in the current row as a java.sql.Timestamp object.
  227.      *
  228.      * @param columnIndex the first column is 1, the second is 2, ...
  229.      * @return the column value; if the value is SQL NULL, the result is null
  230.      * @exception SQLException if a database-access error occurs.
  231.      */
  232.     java.sql.Timestamp getTimestamp(int columnIndex) throws SQLException;
  233.  
  234.     /**
  235.      * A column value can be retrieved as a stream of ASCII characters 
  236.      * and then read in chunks from the stream.  This method is particularly
  237.      * suitable for retrieving large LONGVARCHAR values.  The JDBC driver will
  238.      * do any necessary conversion from the database format into ASCII.
  239.      *
  240.      * <P><B>Note:</B> All the data in the returned stream must be
  241.      * read prior to getting the value of any other column. The next
  242.      * call to a get method implicitly closes the stream. . Also, a
  243.      * stream may return 0 for available() whether there is data
  244.      * available or not.
  245.      *
  246.      * @param columnIndex the first column is 1, the second is 2, ...
  247.      * @return a Java input stream that delivers the database column value
  248.      * as a stream of one byte ASCII characters.  If the value is SQL NULL
  249.      * then the result is null.  
  250.      * @exception SQLException if a database-access error occurs.
  251.      */
  252.     java.io.InputStream getAsciiStream(int columnIndex) throws SQLException;
  253.  
  254.     /**
  255.      * A column value can be retrieved as a stream of Unicode characters 
  256.      * and then read in chunks from the stream.  This method is particularly
  257.      * suitable for retrieving large LONGVARCHAR values.  The JDBC driver will
  258.      * do any necessary conversion from the database format into Unicode.
  259.      *
  260.      * <P><B>Note:</B> All the data in the returned stream must be
  261.      * read prior to getting the value of any other column. The next
  262.      * call to a get method implicitly closes the stream. . Also, a
  263.      * stream may return 0 for available() whether there is data
  264.      * available or not.
  265.      *
  266.      * @param columnIndex the first column is 1, the second is 2, ...
  267.      * @return a Java input stream that delivers the database column value
  268.      * as a stream of two byte Unicode characters.  If the value is SQL NULL
  269.      * then the result is null.  
  270.      * @exception SQLException if a database-access error occurs.
  271.      * @deprecated
  272.      */
  273.     java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException;
  274.  
  275.     /**
  276.      * A column value can be retrieved as a stream of uninterpreted bytes 
  277.      * and then read in chunks from the stream.  This method is particularly
  278.      * suitable for retrieving large LONGVARBINARY values.
  279.      *
  280.      * <P><B>Note:</B> All the data in the returned stream must be
  281.      * read prior to getting the value of any other column. The next
  282.      * call to a get method implicitly closes the stream. Also, a
  283.      * stream may return 0 for available() whether there is data
  284.      * available or not.
  285.      *
  286.      * @param columnIndex the first column is 1, the second is 2, ...
  287.      * @return a Java input stream that delivers the database column value
  288.      * as a stream of uninterpreted bytes.  If the value is SQL NULL
  289.      * then the result is null.  
  290.      * @exception SQLException if a database-access error occurs.
  291.      */
  292.     java.io.InputStream getBinaryStream(int columnIndex)
  293.         throws SQLException;
  294.  
  295.  
  296.     //======================================================================
  297.     // Methods for accessing results by column name
  298.     //======================================================================
  299.  
  300.     /**
  301.      * Get the value of a column in the current row as a Java String.
  302.      *
  303.      * @param columnName is the SQL name of the column
  304.      * @return the column value; if the value is SQL NULL, the result is null
  305.      * @exception SQLException if a database-access error occurs.
  306.      */
  307.     String getString(String columnName) throws SQLException;
  308.  
  309.     /**
  310.      * Get the value of a column in the current row as a Java boolean.
  311.      *
  312.      * @param columnName is the SQL name of the column
  313.      * @return the column value; if the value is SQL NULL, the result is false
  314.      * @exception SQLException if a database-access error occurs.
  315.      */
  316.     boolean getBoolean(String columnName) throws SQLException;
  317.  
  318.     /**
  319.      * Get the value of a column in the current row as a Java byte.
  320.      *
  321.      * @param columnName is the SQL name of the column
  322.      * @return the column value; if the value is SQL NULL, the result is 0
  323.      * @exception SQLException if a database-access error occurs.
  324.      */
  325.     byte getByte(String columnName) throws SQLException;
  326.  
  327.     /**
  328.      * Get the value of a column in the current row as a Java short.
  329.      *
  330.      * @param columnName is the SQL name of the column
  331.      * @return the column value; if the value is SQL NULL, the result is 0
  332.      * @exception SQLException if a database-access error occurs.
  333.      */
  334.     short getShort(String columnName) throws SQLException;
  335.  
  336.     /**
  337.      * Get the value of a column in the current row as a Java int.
  338.      *
  339.      * @param columnName is the SQL name of the column
  340.      * @return the column value; if the value is SQL NULL, the result is 0
  341.      * @exception SQLException if a database-access error occurs.
  342.      */
  343.     int getInt(String columnName) throws SQLException;
  344.  
  345.     /**
  346.      * Get the value of a column in the current row as a Java long.
  347.      *
  348.      * @param columnName is the SQL name of the column
  349.      * @return the column value; if the value is SQL NULL, the result is 0
  350.      * @exception SQLException if a database-access error occurs.
  351.      */
  352.     long getLong(String columnName) throws SQLException;
  353.  
  354.     /**
  355.      * Get the value of a column in the current row as a Java float.
  356.      *
  357.      * @param columnName is the SQL name of the column
  358.      * @return the column value; if the value is SQL NULL, the result is 0
  359.      * @exception SQLException if a database-access error occurs.
  360.      */
  361.     float getFloat(String columnName) throws SQLException;
  362.  
  363.     /**
  364.      * Get the value of a column in the current row as a Java double.
  365.      *
  366.      * @param columnName is the SQL name of the column
  367.      * @return the column value; if the value is SQL NULL, the result is 0
  368.      * @exception SQLException if a database-access error occurs.
  369.      */
  370.     double getDouble(String columnName) throws SQLException;
  371.  
  372.     /**
  373.      * Get the value of a column in the current row as a java.lang.BigDecimal 
  374.      * object.
  375.      *
  376.      * @param columnName is the SQL name of the column
  377.      * @param scale the number of digits to the right of the decimal
  378.      * @return the column value; if the value is SQL NULL, the result is null
  379.      * @exception SQLException if a database-access error occurs.
  380.      */
  381.     BigDecimal getBigDecimal(String columnName, int scale) throws SQLException;
  382.  
  383.     /**
  384.      * Get the value of a column in the current row as a Java byte array.
  385.      * The bytes represent the raw values returned by the driver.
  386.      *
  387.      * @param columnName is the SQL name of the column
  388.      * @return the column value; if the value is SQL NULL, the result is null
  389.      * @exception SQLException if a database-access error occurs.
  390.      */
  391.     byte[] getBytes(String columnName) throws SQLException;
  392.  
  393.     /**
  394.      * Get the value of a column in the current row as a java.sql.Date object.
  395.      *
  396.      * @param columnName is the SQL name of the column
  397.      * @return the column value; if the value is SQL NULL, the result is null
  398.      * @exception SQLException if a database-access error occurs.
  399.      */
  400.     java.sql.Date getDate(String columnName) throws SQLException;
  401.  
  402.     /**
  403.      * Get the value of a column in the current row as a java.sql.Time object.
  404.      *
  405.      * @param columnName is the SQL name of the column
  406.      * @return the column value; if the value is SQL NULL, the result is null
  407.      * @exception SQLException if a database-access error occurs.
  408.      */
  409.     java.sql.Time getTime(String columnName) throws SQLException;
  410.  
  411.     /**
  412.      * Get the value of a column in the current row as a java.sql.Timestamp object.
  413.      *
  414.      * @param columnName is the SQL name of the column
  415.      * @return the column value; if the value is SQL NULL, the result is null
  416.      * @exception SQLException if a database-access error occurs.
  417.      */
  418.     java.sql.Timestamp getTimestamp(String columnName) throws SQLException;
  419.  
  420.     /**
  421.      * A column value can be retrieved as a stream of ASCII characters 
  422.      * and then read in chunks from the stream.  This method is particularly
  423.      * suitable for retrieving large LONGVARCHAR values.  The JDBC driver will
  424.      * do any necessary conversion from the database format into ASCII.
  425.      *
  426.      * <P><B>Note:</B> All the data in the returned stream must
  427.      * be read prior to getting the value of any other column. The
  428.      * next call to a get method implicitly closes the stream.
  429.      *
  430.      * @param columnName is the SQL name of the column
  431.      * @return a Java input stream that delivers the database column value
  432.      * as a stream of one byte ASCII characters.  If the value is SQL NULL
  433.      * then the result is null.
  434.      * @exception SQLException if a database-access error occurs.
  435.      */
  436.     java.io.InputStream getAsciiStream(String columnName) throws SQLException;
  437.  
  438.     /**
  439.      * A column value can be retrieved as a stream of Unicode characters 
  440.      * and then read in chunks from the stream.  This method is particularly
  441.      * suitable for retrieving large LONGVARCHAR values.  The JDBC driver will
  442.      * do any necessary conversion from the database format into Unicode.
  443.      *
  444.      * <P><B>Note:</B> All the data in the returned stream must
  445.      * be read prior to getting the value of any other column. The
  446.      * next call to a get method implicitly closes the stream.
  447.      *
  448.      * @param columnName is the SQL name of the column
  449.      * @return a Java input stream that delivers the database column value
  450.      * as a stream of two byte Unicode characters.  If the value is SQL NULL
  451.      * then the result is null.
  452.      * @exception SQLException if a database-access error occurs.
  453.      * @deprecated
  454.      */
  455.     java.io.InputStream getUnicodeStream(String columnName) throws SQLException;
  456.  
  457.     /**
  458.      * A column value can be retrieved as a stream of uninterpreted bytes 
  459.      * and then read in chunks from the stream.  This method is particularly
  460.      * suitable for retrieving large LONGVARBINARY values.
  461.      *
  462.      * <P><B>Note:</B> All the data in the returned stream must
  463.      * be read prior to getting the value of any other column. The
  464.      * next call to a get method implicitly closes the stream.
  465.      *
  466.      * @param columnName is the SQL name of the column
  467.      * @return a Java input stream that delivers the database column value
  468.      * as a stream of uninterpreted bytes.  If the value is SQL NULL
  469.      * then the result is null.
  470.      * @exception SQLException if a database-access error occurs.
  471.      */
  472.     java.io.InputStream getBinaryStream(String columnName)
  473.         throws SQLException;
  474.  
  475.  
  476.     //=====================================================================
  477.     // Advanced features:
  478.     //=====================================================================
  479.  
  480.     /**
  481.      * <p>The first warning reported by calls on this ResultSet is
  482.      * returned. Subsequent ResultSet warnings will be chained to this
  483.      * SQLWarning.
  484.      *
  485.      * <P>The warning chain is automatically cleared each time a new
  486.      * row is read.
  487.      *
  488.      * <P><B>Note:</B> This warning chain only covers warnings caused
  489.      * by ResultSet methods.  Any warning caused by statement methods
  490.      * (such as reading OUT parameters) will be chained on the
  491.      * Statement object. 
  492.      *
  493.      * @return the first SQLWarning or null 
  494.      * @exception SQLException if a database-access error occurs.
  495.      */
  496.     SQLWarning getWarnings() throws SQLException;
  497.  
  498.     /**
  499.      * After this call getWarnings returns null until a new warning is
  500.      * reported for this ResultSet.  
  501.      *
  502.      * @exception SQLException if a database-access error occurs.
  503.      */
  504.     void clearWarnings() throws SQLException;
  505.  
  506.     /**
  507.      * Get the name of the SQL cursor used by this ResultSet.
  508.      *
  509.      * <P>In SQL, a result table is retrieved through a cursor that is
  510.      * named. The current row of a result can be updated or deleted
  511.      * using a positioned update/delete statement that references the
  512.      * cursor name. 
  513.      * 
  514.      * <P>JDBC supports this SQL feature by providing the name of the
  515.      * SQL cursor used by a ResultSet. The current row of a ResultSet
  516.      * is also the current row of this SQL cursor.
  517.      *
  518.      * <P><B>Note:</B> If positioned update is not supported a
  519.      * SQLException is thrown
  520.      *
  521.      * @return the ResultSet's SQL cursor name
  522.      * @exception SQLException if a database-access error occurs.
  523.      */
  524.     String getCursorName() throws SQLException;
  525.  
  526.     /**
  527.      * The number, types and properties of a ResultSet's columns
  528.      * are provided by the getMetaData method.
  529.      *
  530.      * @return the description of a ResultSet's columns
  531.      * @exception SQLException if a database-access error occurs.
  532.      */
  533.     ResultSetMetaData getMetaData() throws SQLException;
  534.  
  535.     /**
  536.      * <p>Get the value of a column in the current row as a Java object.
  537.      *
  538.      * <p>This method will return the value of the given column as a
  539.      * Java object.  The type of the Java object will be the default
  540.      * Java Object type corresponding to the column's SQL type,
  541.      * following the mapping specified in the JDBC spec.
  542.      *
  543.      * <p>This method may also be used to read datatabase specific abstract
  544.      * data types.
  545.      *
  546.      * @param columnIndex the first column is 1, the second is 2, ...
  547.      * @return A java.lang.Object holding the column value.  
  548.      * @exception SQLException if a database-access error occurs.
  549.      */
  550.     Object getObject(int columnIndex) throws SQLException;
  551.  
  552.     /**
  553.      * <p>Get the value of a column in the current row as a Java object.
  554.      *
  555.      * <p>This method will return the value of the given column as a
  556.      * Java object.  The type of the Java object will be the default
  557.      * Java Object type corresponding to the column's SQL type,
  558.      * following the mapping specified in the JDBC spec.
  559.      *
  560.      * <p>This method may also be used to read datatabase specific abstract
  561.      * data types.
  562.      *
  563.      * @param columnName is the SQL name of the column
  564.      * @return A java.lang.Object holding the column value.  
  565.      * @exception SQLException if a database-access error occurs.
  566.      */
  567.     Object getObject(String columnName) throws SQLException;
  568.  
  569.     //----------------------------------------------------------------
  570.  
  571.     /**
  572.      * Map a Resultset column name to a ResultSet column index.
  573.      *
  574.      * @param columnName the name of the column
  575.      * @return the column index
  576.      * @exception SQLException if a database-access error occurs.
  577.      */
  578.     int findColumn(String columnName) throws SQLException;
  579.  
  580.  
  581.     //--------------------------JDBC 2.0-----------------------------------
  582.  
  583.     //---------------------------------------------------------------------
  584.     // Getter's and Setter's
  585.     //---------------------------------------------------------------------
  586.  
  587.     /**
  588.      * JDBC 2.0
  589.      *
  590.      * <p>Get the value of a column in the current row as a java.io.Reader.
  591.      */
  592.     java.io.Reader getCharacterStream(int columnIndex) throws SQLException;
  593.  
  594.     /**
  595.      * JDBC 2.0
  596.      *
  597.      * <p>Get the value of a column in the current row as a java.io.Reader.
  598.      */
  599.     java.io.Reader getCharacterStream(String columnName) throws SQLException;
  600.  
  601.     /**
  602.      * JDBC 2.0
  603.      *
  604.      * Get the value of a column in the current row as a java.lang.BigDecimal 
  605.      * object.
  606.      *
  607.      * @param columnIndex the first column is 1, the second is 2, ...
  608.      * @return the column value (full precision); if the value is SQL NULL, 
  609.      * the result is null
  610.      * @exception SQLException if a database-access error occurs.
  611.      */
  612.     BigDecimal getBigDecimal(int columnIndex) throws SQLException;
  613.  
  614.     /**
  615.      * JDBC 2.0
  616.      *
  617.      * Get the value of a column in the current row as a java.lang.BigDecimal 
  618.      * object.
  619.      *
  620.      */
  621.     BigDecimal getBigDecimal(String columnName) throws SQLException;
  622.  
  623.     //---------------------------------------------------------------------
  624.     // Traversal/Positioning
  625.     //---------------------------------------------------------------------
  626.  
  627.     /**
  628.      * JDBC 2.0
  629.      *
  630.      * <p>Determine if the cursor is before the first row in the result 
  631.      * set.   
  632.      *
  633.      * @return true if before the first row, false otherwise. Returns
  634.      * false when the result set contains no rows.
  635.      * @exception SQLException if a database-access error occurs.
  636.      */
  637.     boolean isBeforeFirst() throws SQLException;
  638.       
  639.     /**
  640.      * JDBC 2.0
  641.      *
  642.      * <p>Determine if the cursor is after the last row in the result 
  643.      * set.   
  644.      *
  645.      * @return true if after the last row, false otherwise.  Returns
  646.      * false when the result set contains no rows.
  647.      * @exception SQLException if a database-access error occurs.
  648.      */
  649.     boolean isAfterLast() throws SQLException;
  650.  
  651.     /**
  652.      * JDBC 2.0
  653.      *
  654.      * <p>Determine if the cursor is on the first row of the result set.   
  655.      *
  656.      * @return true if on the first row, false otherwise.   
  657.      * @exception SQLException if a database-access error occurs.
  658.      */
  659.     boolean isFirst() throws SQLException;
  660.  
  661.     /**
  662.      * JDBC 2.0
  663.      *
  664.      * <p>Determine if the cursor is on the last row of the result set.   
  665.      * Note: Calling isLast() may be expensive since the JDBC driver
  666.      * might need to fetch ahead one row in order to determine 
  667.      * whether the current row is the last row in the result set.
  668.      *
  669.      * @return true if on the last row, false otherwise. 
  670.      * @exception SQLException if a database-access error occurs.
  671.      */
  672.     boolean isLast() throws SQLException;
  673.  
  674.     /**
  675.      * JDBC 2.0
  676.      *
  677.      * <p>Moves to the front of the result set, just before the
  678.      * first row. Has no effect if the result set contains no rows.
  679.      *
  680.      * @exception SQLException if a database-access error occurs, or
  681.      * result set type is TYPE_FORWARD_ONLY
  682.      */
  683.     void beforeFirst() throws SQLException;
  684.  
  685.     /**
  686.      * JDBC 2.0
  687.      *
  688.      * <p>Moves to the end of the result set, just after the last
  689.      * row.  Has no effect if the result set contains no rows.
  690.      *
  691.      * @exception SQLException if a database-access error occurs, or
  692.      * result set type is TYPE_FORWARD_ONLY.
  693.      */
  694.     void afterLast() throws SQLException;
  695.  
  696.     /**
  697.      * JDBC 2.0
  698.      *
  699.      * <p>Moves to the first row in the result set.  
  700.      *
  701.      * @return true if on a valid row, false if no rows in the result set.
  702.      * @exception SQLException if a database-access error occurs, or
  703.      * result set type is TYPE_FORWARD_ONLY.
  704.      */
  705.     boolean first() throws SQLException;
  706.  
  707.     /**
  708.      * JDBC 2.0
  709.      *
  710.      * <p>Moves to the last row in the result set.  
  711.      *
  712.      * @return true if on a valid row, false if no rows in the result set.
  713.      * @exception SQLException if a database-access error occurs, or
  714.      * result set type is TYPE_FORWARD_ONLY.
  715.      */
  716.     boolean last() throws SQLException;
  717.  
  718.     /**
  719.      * JDBC 2.0
  720.      *
  721.      * <p>Determine the current row number.  The first row is number 1, the
  722.      * second number 2, etc.  
  723.      *
  724.      * @return the current row number, else return 0 if there is no 
  725.      * current row.
  726.      * @exception SQLException if a database-access error occurs.
  727.      */
  728.     int getRow() throws SQLException;
  729.  
  730.     /**
  731.      * JDBC 2.0
  732.      *
  733.      * <p>Move to an absolute row number in the result set.
  734.      *
  735.      * <p>If row is positive, moves to an absolute row with respect to the
  736.      * beginning of the result set.  The first row is row 1, the second
  737.      * is row 2, etc. 
  738.      *
  739.      * <p>If row is negative, moves to an absolute row position with respect to
  740.      * the end of result set.  For example, calling absolute(-1) positions the 
  741.      * cursor on the last row, absolute(-2) indicates the next-to-last
  742.      * row, etc.
  743.      *
  744.      * <p>An attempt to position the cursor beyond the first/last row in
  745.      * the result set, leaves the cursor before/after the first/last
  746.      * row, respectively.
  747.      *
  748.      * <p>Note: Calling absolute(1) is the same as calling first().
  749.      * Calling absolute(-1) is the same as calling last().
  750.      *
  751.      * @return true if on the result set, false if off.
  752.      * @exception SQLException if a database-access error occurs, or 
  753.      * row is 0, or result set type is TYPE_FORWARD_ONLY.
  754.      */
  755.     boolean absolute( int row ) throws SQLException;
  756.  
  757.     /**
  758.      * JDBC 2.0
  759.      *
  760.      * <p>Moves a relative number of rows, either positive or negative.
  761.      * Attempting to move beyond the first/last row in the
  762.      * result set positions the cursor before/after the
  763.      * the first/last row. Calling relative(0) is valid, but does
  764.      * not change the cursor position.
  765.      *
  766.      * <p>Note: Calling relative(1) is different than calling next()
  767.      * since is makes sense to call next() when there is no current row,
  768.      * for example, when the cursor is positioned before the first row
  769.      * or after the last row of the result set.
  770.      *
  771.      * @return true if on a row, false otherwise.
  772.      * @exception SQLException if a database-access error occurs, or there
  773.      * is no current row, or result set type is TYPE_FORWARD_ONLY.
  774.      */
  775.     boolean relative( int rows ) throws SQLException;
  776.  
  777.     /**
  778.      * JDBC 2.0
  779.      *
  780.      * <p>Moves to the previous row in the result set.  
  781.      *
  782.      * <p>Note: previous() is not the same as relative(-1) since it
  783.      * makes sense to call previous() when there is no current row.
  784.      *
  785.      * @return true if on a valid row, false if off the result set.
  786.      * @exception SQLException if a database-access error occurs, or
  787.      * result set type is TYPE_FORWAR_DONLY.
  788.      */
  789.     boolean previous() throws SQLException;
  790.  
  791.     //---------------------------------------------------------------------
  792.     // Properties
  793.     //---------------------------------------------------------------------
  794.  
  795.     /**
  796.      * JDBC 2.0
  797.      *
  798.      * The rows in a result set will be processed in a forward direction;
  799.      * first-to-last.
  800.      */
  801.     int FETCH_FORWARD = 1000;
  802.  
  803.     /**
  804.      * JDBC 2.0
  805.      *
  806.      * The rows in a result set will be processed in a reverse direction;
  807.      * last-to-first.
  808.      */
  809.     int FETCH_REVERSE = 1001;
  810.  
  811.     /**
  812.      * JDBC 2.0
  813.      * 
  814.      * The order in which rows in a result set will be processed is unknown.
  815.      */
  816.     int FETCH_UNKNOWN = 1002;
  817.  
  818.     /**
  819.      * JDBC 2.0
  820.      *
  821.      * Give a hint as to the direction in which the rows in this result set
  822.      * will be processed.  The initial value is determined by the statement
  823.      * that produced the result set.  The fetch direction may be changed
  824.      * at any time.
  825.      *
  826.      * @exception SQLException if a database-access error occurs, or
  827.      * the result set type is TYPE_FORWARD_ONLY and direction is not 
  828.      * FETCH_FORWARD.
  829.      */
  830.     void setFetchDirection(int direction) throws SQLException;
  831.  
  832.     /**
  833.      * JDBC 2.0
  834.      *
  835.      * Return the fetch direction for this result set.
  836.      *
  837.      * @exception SQLException if a database-access error occurs 
  838.      */
  839.     int getFetchDirection() throws SQLException;
  840.  
  841.     /**
  842.      * JDBC 2.0
  843.      *
  844.      * Give the JDBC driver a hint as to the number of rows that should 
  845.      * be fetched from the database when more rows are needed for this result
  846.      * set.  If the fetch size specified is zero, then the JDBC driver 
  847.      * ignores the value, and is free to make its own best guess as to what
  848.      * the fetch size should be.  The default value is set by the statement 
  849.      * that creates the result set.  The fetch size may be changed at any 
  850.      * time.
  851.      *
  852.      * @param rows the number of rows to fetch
  853.      * @exception SQLException if a database-access error occurs, or the
  854.      * condition 0 <= rows <= this.getMaxRows() is not satisfied.
  855.      */
  856.     void setFetchSize(int rows) throws SQLException;
  857.  
  858.     /**
  859.      * JDBC 2.0
  860.      *
  861.      * Return the fetch size for this result set.
  862.      *
  863.      * @exception SQLException if a database-access error occurs 
  864.      */
  865.     int getFetchSize() throws SQLException;
  866.  
  867.     /**
  868.      * JDBC 2.0
  869.      *
  870.      * Give the JDBC driver a hint as to the number of keys contained in the
  871.      * keyset of a TYPE_KEYSET result set.  The number of keys specified only 
  872.      * affects this result set. The initial value is set by the statement
  873.      * that created the result set.  The keyset size may be changed at any 
  874.      * time.
  875.      *
  876.      * @param rows the number of keys in a keyset
  877.      * @exception SQLException if a database-access error occurs, or the
  878.      * condition this.getFetchSize() <= keys <= this.getMaxRows() is not 
  879.      * satisfied.
  880.      */
  881.     void setKeysetSize(int keys) throws SQLException;
  882.   
  883.     /**
  884.      * JDBC 2.0
  885.      *
  886.      * Return the keyset size for this result set.
  887.      *
  888.      * @exception SQLException if a database-access error occurs 
  889.      */
  890.     int getKeysetSize() throws SQLException;
  891.  
  892.     /**
  893.      * JDBC 2.0
  894.      */
  895.     int TYPE_FORWARD_ONLY = 1003;
  896.  
  897.     /**
  898.      * JDBC 2.0
  899.      */
  900.     int TYPE_STATIC = 1004;
  901.  
  902.     /**
  903.      * JDBC 2.0
  904.      */
  905.     int TYPE_KEYSET = 1005;
  906.  
  907.     /**
  908.      * JDBC 2.0
  909.      */
  910.     int TYPE_DYNAMIC = 1006;
  911.  
  912.     /**
  913.      * JDBC 2.0
  914.      *
  915.      * Return the type of this result set.  The type is determined based
  916.      * on the statement that created the result set.
  917.      *
  918.      * @return TYPE_FORWARD_ONLY, TYPE_STATIC, TYPE_KEYSET, or 
  919.      * TYPE_DYNAMIC.
  920.      * @exception SQLException if a database-access error occurs
  921.      */
  922.     int getType() throws SQLException;
  923.  
  924.     /**
  925.      * JDBC 2.0
  926.      * 
  927.      *  
  928.      */
  929.     int CONCUR_READ_ONLY = 1007;
  930.  
  931.     /**
  932.      * JDBC 2.0
  933.      * 
  934.      *  
  935.      */
  936.     int CONCUR_LOCK = 1008;
  937.  
  938.     /**
  939.      * JDBC 2.0
  940.      * 
  941.      *  
  942.      */
  943.     int CONCUR_VERSION = 1009;
  944.  
  945.     /**
  946.      * JDBC 2.0
  947.      * 
  948.      *  
  949.      */
  950.     int CONCUR_VALUE = 1010;
  951.  
  952.     /**
  953.      * JDBC 2.0
  954.      *
  955.      * Return the concurrency of this result set.  The concurrency
  956.      * used is determined by the statement that created the result set.
  957.      *
  958.      * @return the concurrency type, CONCUR_READ_ONLY, etc.
  959.      * @exception SQLException if a database-access error occurs
  960.      */
  961.     int getConcurrency() throws SQLException;
  962.  
  963.     //---------------------------------------------------------------------
  964.     // Updates
  965.     //---------------------------------------------------------------------
  966.  
  967.     /**
  968.      * JDBC 2.0
  969.      *
  970.      * Determine if the current row has been updated. 
  971.      *
  972.      * The value returned depends on whether or not the result set
  973.      * can detect changes, see DatabaseMetaData.rowChangesAreDetected().
  974.      *
  975.      * @return true if updated
  976.      * @exception SQLException if a database-access error occurs
  977.      * 
  978.      * @see DatabaseMetaData#detectsRowChanges
  979.      */
  980.     boolean rowUpdated() throws SQLException;
  981.  
  982.     /**
  983.      * JDBC 2.0
  984.      *
  985.      * Determine if the current row has been inserted. 
  986.      *
  987.      * The value returned depends on whether or not the result set
  988.      * can detect changes, see DatabaseMetaData.rowChangesAreDetected().
  989.      *
  990.      * @return true if inserted
  991.      * @exception SQLException if a database-access error occurs
  992.      * 
  993.      * @see DatabaseMetaData#detectsRowChanges
  994.      */
  995.     boolean rowInserted() throws SQLException;
  996.    
  997.     /**
  998.      * JDBC 2.0
  999.      *
  1000.      * Determine if this row has been deleted.  A result set of type
  1001.      * keyset or static may contain rows that have been deleted.
  1002.      *
  1003.      * The value returned depends on whether or not the result set
  1004.      * can detect changes, see DatabaseMetaData.rowChangesAreDetected().
  1005.      *
  1006.      * @return true if deleted
  1007.      * @exception SQLException if a database-access error occurs
  1008.      * 
  1009.      * @see DatabaseMetaData#detectsRowChanges
  1010.      */
  1011.     boolean rowDeleted() throws SQLException;
  1012.  
  1013.     /** 
  1014.      * The updateXXX() methods are used to update column values in the
  1015.      * current row, or the insert row.  
  1016.      * The updateXXX() methods do not update the underlying
  1017.      * database, instead, they update an in-memory copy of the data read 
  1018.      * from the database.
  1019.      *  
  1020.      * The insert row is a special row associated with an updatable
  1021.      * result set.  It is essentially a buffer where a new row may
  1022.      * be constructed by calling the updateXXX() methods prior to 
  1023.      * inserting the row into the result set.
  1024.      *
  1025.      * To update the underlying database, updateRow(), insertRow, or
  1026.      * deleteRow may be called.
  1027.      */
  1028.  
  1029.     /**
  1030.      * JDBC 2.0
  1031.      */
  1032.     void updateNull(int columnIndex) throws SQLException;  
  1033.  
  1034.     /**
  1035.      * JDBC 2.0
  1036.      */
  1037.     void updateBoolean(int columnIndex, boolean x) throws SQLException;
  1038.  
  1039.     /**
  1040.      * JDBC 2.0
  1041.      */
  1042.     void updateByte(int columnIndex, byte x) throws SQLException;
  1043.  
  1044.     /**
  1045.      * JDBC 2.0
  1046.      */
  1047.     void updateShort(int columnIndex, short x) throws SQLException;
  1048.  
  1049.     /**
  1050.      * JDBC 2.0
  1051.      */
  1052.     void updateInt(int columnIndex, int x) throws SQLException;
  1053.  
  1054.     /**
  1055.      * JDBC 2.0
  1056.      */
  1057.     void updateLong(int columnIndex, long x) throws SQLException;
  1058.  
  1059.     /**
  1060.      * JDBC 2.0
  1061.      */
  1062.     void updateFloat(int columnIndex, float x) throws SQLException;
  1063.  
  1064.     /**
  1065.      * JDBC 2.0
  1066.      */
  1067.     void updateDouble(int columnIndex, double x) throws SQLException;
  1068.  
  1069.     /**
  1070.      * JDBC 2.0
  1071.      */
  1072.     void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException;
  1073.  
  1074.     /**
  1075.      * JDBC 2.0
  1076.      */
  1077.     void updateString(int columnIndex, String x) throws SQLException;
  1078.  
  1079.     /**
  1080.      * JDBC 2.0
  1081.      */
  1082.     void updateBytes(int columnIndex, byte x[]) throws SQLException;
  1083.  
  1084.     /**
  1085.      * JDBC 2.0
  1086.      */
  1087.     void updateDate(int columnIndex, java.sql.Date x) throws SQLException;
  1088.  
  1089.     /**
  1090.      * JDBC 2.0
  1091.      */
  1092.     void updateTime(int columnIndex, java.sql.Time x) throws SQLException;
  1093.  
  1094.     /**
  1095.      * JDBC 2.0
  1096.      */
  1097.     void updateTimestamp(int columnIndex, java.sql.Timestamp x)
  1098.       throws SQLException;
  1099.  
  1100.     /** 
  1101.      * JDBC 2.0
  1102.      */
  1103.     void updateAsciiStream(int columnIndex, 
  1104.                java.io.InputStream x, 
  1105.                int length) throws SQLException;
  1106.  
  1107.     /** 
  1108.      * JDBC 2.0
  1109.      */
  1110.     void updateBinaryStream(int columnIndex, 
  1111.                 java.io.InputStream x,
  1112.                 int length) throws SQLException;
  1113.  
  1114.     /**
  1115.      * JDBC 2.0
  1116.      */
  1117.     void updateCharacterStream(int columnIndex,
  1118.                  java.io.Reader reader,
  1119.                  int length) throws SQLException;
  1120.  
  1121.     /**
  1122.      * JDBC 2.0
  1123.      */
  1124.     void updateObject(int columnIndex, Object x, int scale)
  1125.       throws SQLException;
  1126.  
  1127.     /**
  1128.      * JDBC 2.0
  1129.      */
  1130.     void updateObject(int columnIndex, Object x) throws SQLException;
  1131.  
  1132.     /**
  1133.      * JDBC 2.0
  1134.      */
  1135.     void updateNull(String columnName) throws SQLException;  
  1136.  
  1137.     /**
  1138.      * JDBC 2.0
  1139.      */
  1140.     void updateBoolean(String columnName, boolean x) throws SQLException;
  1141.  
  1142.     /**
  1143.      * JDBC 2.0
  1144.      */
  1145.     void updateByte(String columnName, byte x) throws SQLException;
  1146.  
  1147.     /**
  1148.      * JDBC 2.0
  1149.      */
  1150.     void updateShort(String columnName, short x) throws SQLException;
  1151.  
  1152.     /**
  1153.      * JDBC 2.0
  1154.      */
  1155.     void updateInt(String columnName, int x) throws SQLException;
  1156.  
  1157.     /**
  1158.      * JDBC 2.0
  1159.      */
  1160.     void updateLong(String columnName, long x) throws SQLException;
  1161.  
  1162.     /**
  1163.      * JDBC 2.0
  1164.      */
  1165.     void updateFloat(String columnName, float x) throws SQLException;
  1166.  
  1167.     /**
  1168.      * JDBC 2.0
  1169.      */
  1170.     void updateDouble(String columnName, double x) throws SQLException;
  1171.  
  1172.     /**
  1173.      * JDBC 2.0
  1174.      */
  1175.     void updateBigDecimal(String columnName, BigDecimal x) throws SQLException;
  1176.  
  1177.     /**
  1178.      * JDBC 2.0
  1179.      */
  1180.     void updateString(String columnName, String x) throws SQLException;
  1181.  
  1182.     /**
  1183.      * JDBC 2.0
  1184.      */
  1185.     void updateBytes(String columnName, byte x[]) throws SQLException;
  1186.  
  1187.     /**
  1188.      * JDBC 2.0
  1189.      */
  1190.     void updateDate(String columnName, java.sql.Date x) throws SQLException;
  1191.  
  1192.     /**
  1193.      * JDBC 2.0
  1194.      */
  1195.     void updateTime(String columnName, java.sql.Time x) throws SQLException;
  1196.  
  1197.     /**
  1198.      * JDBC 2.0
  1199.      */
  1200.     void updateTimestamp(String columnName, java.sql.Timestamp x)
  1201.       throws SQLException;
  1202.  
  1203.     /** 
  1204.      * JDBC 2.0
  1205.      */
  1206.     void updateAsciiStream(String columnName, 
  1207.                java.io.InputStream x, 
  1208.                int length) throws SQLException;
  1209.  
  1210.     /** 
  1211.      * JDBC 2.0
  1212.      */
  1213.     void updateBinaryStream(String columnName, 
  1214.                 java.io.InputStream x,
  1215.                 int length) throws SQLException;
  1216.  
  1217.     /**
  1218.      * JDBC 2.0
  1219.      */
  1220.     void updateCharacterStream(String columnName,
  1221.                  java.io.Reader reader,
  1222.                  int length) throws SQLException;
  1223.  
  1224.     /**
  1225.      * JDBC 2.0
  1226.      */
  1227.     void updateObject(String columnName, Object x, int scale)
  1228.       throws SQLException;
  1229.  
  1230.     /**
  1231.      * JDBC 2.0
  1232.      */
  1233.     void updateObject(String columnName, Object x) throws SQLException;
  1234.  
  1235.     /**
  1236.      * JDBC 2.0
  1237.      *
  1238.      * Insert the contents of the insert row into the result set and
  1239.      * the database.  Must be on the insert row when this method is called.
  1240.      *
  1241.      * @exception SQLException if a database-access error occurs
  1242.      */
  1243.     void insertRow() throws SQLException;
  1244.  
  1245.     /**
  1246.      * JDBC 2.0
  1247.      *
  1248.      * Update the underlying database with the new contents of the
  1249.      * current row.  Cannot be called when on the insert row.
  1250.      */
  1251.     void updateRow() throws SQLException;
  1252.  
  1253.     /**
  1254.      * JDBC 2.0
  1255.      *
  1256.      * Delete the current row from the result set and the underlying
  1257.      * database.  Cannot be called when on the insert row.
  1258.      *
  1259.      * @exception SQLException if a database-access error occurs
  1260.      */
  1261.     void deleteRow() throws SQLException;
  1262.  
  1263.     /**
  1264.      * JDBC 2.0
  1265.      *
  1266.      * Refresh the value of the current row with the value in the database.
  1267.      * Cannot be called when on the insert row.
  1268.      *
  1269.      * @exception SQLException if a database-access error occurs
  1270.      */
  1271.     void refreshRow() throws SQLException;
  1272.  
  1273.     /**
  1274.      * JDBC 2.0
  1275.      *
  1276.      * Move to the insert row.  The current row is remembered.
  1277.      *
  1278.      * Only the updateXXX() and insertRow() methods may be called 
  1279.      * when the result set is in insert mode.
  1280.      *
  1281.      * @exception SQLException if a database-access error occurs
  1282.      */
  1283.     void moveToInsertRow() throws SQLException;
  1284.  
  1285.     /**
  1286.      * JDBC 2.0
  1287.      *
  1288.      * Move the cursor to the current row.  Has no effect unless the
  1289.      * cursor is on the insert row.
  1290.      *
  1291.      * @exception SQLException if a database-access error occurs
  1292.      */
  1293.     void moveToCurrentRow() throws SQLException;
  1294.  
  1295.     /**
  1296.      * JDBC 2.0
  1297.      *
  1298.      * New behavior for getObject.
  1299.      * The behavior of the current overloading of method getObject
  1300.      * is extended to materialize data of SQL user-defined types.
  1301.      * When the column @i is a UDT value, the behavior of this
  1302.      * method is as if it were a call to:
  1303.      * getObject(i, this.getConnection().getTypeMap())
  1304.      *
  1305.      * @param i the first column is 1, the second is 2, ...
  1306.      * @return the object representing the SQL user-defined type
  1307.      *
  1308.        Object  getObject (int i) throws SQLException;
  1309.      */
  1310.  
  1311.     /**
  1312.      * JDBC 2.0
  1313.      *
  1314.      * Returns the value of column @i.  Use the @map to determine
  1315.      * the class from which to construct data of SQL Named Types.
  1316.      *
  1317.      * @param i the first column is 1, the second is 2, ...
  1318.      * @param map the mapping from SQL type names to Java classes
  1319.      * @return the object representing the SQL user-defined type
  1320.      */
  1321.      Object  getObject (int i, java.util.Map map) throws SQLException;
  1322.  
  1323.     /**
  1324.      * JDBC 2.0
  1325.      *
  1326.      * Get a REF(<structured-type>) column.
  1327.      *
  1328.      * @param i the first column is 1, the second is 2, ...
  1329.      * @return an object representing data of an SQL REF Type
  1330.      */
  1331.      Ref getRef (int i) throws SQLException;
  1332.  
  1333.     /**
  1334.      * JDBC 2.0
  1335.      *
  1336.      * Get a LOCATOR(BLOB) column.
  1337.      *
  1338.      * @param i the first column is 1, the second is 2, ...
  1339.      * @return an object representing data of a locator to a BLOB
  1340.      */
  1341.      BlobLocator GetBlobLocator (int i) throws SQLException;
  1342.  
  1343.     /**
  1344.      * JDBC 2.0
  1345.      *
  1346.      * Get a LOCATOR(CLOB) column.
  1347.      *
  1348.      * @param i the first column is 1, the second is 2, ...
  1349.      * @return an object representing data of a locator to a CLOB
  1350.      */
  1351.      ClobLocator getClobLocator (int i) throws SQLException;
  1352.  
  1353.     /**
  1354.      * JDBC 2.0
  1355.      *
  1356.      * Get a LOCATOR(<structured-type>) column.
  1357.      *
  1358.      * @param i the first column is 1, the second is 2, ...
  1359.      * @return an object representing data of a locator to an instance
  1360.      * of a Structured Type
  1361.      */
  1362.      StructLocator getStructLocator (int i) throws SQLException;
  1363.  
  1364.     /**
  1365.      * JDBC 2.0
  1366.      *
  1367.      * Get a LOCATOR(<array>) column.
  1368.      *
  1369.      * @param i the first column is 1, the second is 2, ...
  1370.      * @return an object representing data of a locator to an SQL array
  1371.      */
  1372.      ArrayLocator getArrayLocator (int i) throws SQLException;
  1373.  
  1374.      /**
  1375.       * JDBC 2.0
  1376.       *
  1377.       * Return the Statement that produced te ResultSet.
  1378.       */
  1379.      Statement getStatement() throws SQLException;
  1380.  
  1381.     /**
  1382.      * JDBC 2.0
  1383.      *
  1384.      * Returns the value of column @i.  Use the @map to determine
  1385.      * the class from which to construct data of SQL Named Types.
  1386.      *
  1387.      * @param i the first column is 1, the second is 2, ...
  1388.      * @param map the mapping from SQL type names to Java classes
  1389.      * @return the object representing the SQL user-defined type
  1390.      */
  1391.      Object  getObject (String colName, java.util.Map map) 
  1392.        throws SQLException;
  1393.  
  1394.     /**
  1395.      * JDBC 2.0
  1396.      *
  1397.      * Get a REF(<structured-type>) column.
  1398.      *
  1399.      * @param i the column name
  1400.      * @return an object representing data of an SQL REF Type
  1401.      */
  1402.      Ref getRef (String colName) throws SQLException;
  1403.  
  1404.     /**
  1405.      * JDBC 2.0
  1406.      *
  1407.      * Get a LOCATOR(BLOB) column.
  1408.      *
  1409.      * @param i the column name
  1410.      * @return an object representing data of a locator to a BLOB
  1411.      */
  1412.      BlobLocator GetBlobLocator (String colName) throws SQLException;
  1413.  
  1414.     /**
  1415.      * JDBC 2.0
  1416.      *
  1417.      * Get a LOCATOR(CLOB) column.
  1418.      *
  1419.      * @param i the column name
  1420.      * @return an object representing data of a locator to a CLOB
  1421.      */
  1422.      ClobLocator getClobLocator (String colName) throws SQLException;
  1423.  
  1424.     /**
  1425.      * JDBC 2.0
  1426.      *
  1427.      * Get a LOCATOR(<structured-type>) column.
  1428.      *
  1429.      * @param i the column name
  1430.      * @return an object representing data of a locator to an instance
  1431.      * of a Structured Type
  1432.      */
  1433.      StructLocator getStructLocator (String colName) throws SQLException;
  1434.  
  1435.     /**
  1436.      * JDBC 2.0
  1437.      *
  1438.      * Get a LOCATOR(<array>) column.
  1439.      *
  1440.      * @param i the column name
  1441.      * @return an object representing data of a locator to an SQL array
  1442.      */
  1443.      ArrayLocator getArrayLocator (String colName) throws SQLException;
  1444. }
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.