7047 lines · 303.9 KB · Java
RawDownload
    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>double</code>.     *     * @param columnIndex the first column is 1, the second is 2, and so on     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>0</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public double getDouble(int columnIndex) throws SQLException {        checkState();         return rs.getDouble(columnIndex);    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>java.sql.BigDecimal</code>.     *     * @param columnIndex the first column is 1, the second is 2, and so on     * @param scale the number of digits to the right of the decimal point     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     * @deprecated     */    public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {        checkState();         return rs.getBigDecimal(columnIndex, scale);    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>byte</code> array in the Java programming language.     * The bytes represent the raw values returned by the driver.     *     * @param columnIndex the first column is 1, the second is 2, and so on     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public byte[] getBytes(int columnIndex) throws SQLException {        checkState();         return rs.getBytes(columnIndex);    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>java.sql.Date</code> object in the Java programming language.     *     * @param columnIndex the first column is 1, the second is 2, and so on     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public java.sql.Date getDate(int columnIndex) throws SQLException {        checkState();         return rs.getDate(columnIndex);    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>java.sql.Time</code> object in the Java programming language.     *     * @param columnIndex the first column is 1, the second is 2, and so on     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public java.sql.Time getTime(int columnIndex) throws SQLException {        checkState();         return rs.getTime(columnIndex);    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>java.sql.Timestamp</code> object in the Java programming language.     *     * @param columnIndex the first column is 1, the second is 2, and so on     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public java.sql.Timestamp getTimestamp(int columnIndex) throws SQLException {        checkState();         return rs.getTimestamp(columnIndex);    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a stream of ASCII characters. The value can then be read in chunks from the     * stream. This method is particularly     * suitable for retrieving large <code>LONGVARCHAR</code> values.     * The JDBC driver will     * do any necessary conversion from the database format into ASCII.     *     * <P><B>Note:</B> All the data in the returned stream must be     * read prior to getting the value of any other column. The next     * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a     * stream may return <code>0</code> when the method     * <code>InputStream.available</code>     * is called whether there is data available or not.     *     * @param columnIndex the first column is 1, the second is 2, and so on     * @return a Java input stream that delivers the database column value     * as a stream of one-byte ASCII characters;     * if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) database access error occurs     *            (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException {        checkState();         return rs.getAsciiStream(columnIndex);    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * as a stream of Unicode characters.     * The value can then be read in chunks from the     * stream. This method is particularly     * suitable for retrieving large<code>LONGVARCHAR</code>values.  The JDBC driver will     * do any necessary conversion from the database format into Unicode.     * The byte format of the Unicode stream must be Java UTF-8,     * as specified in the Java virtual machine specification.     *     * <P><B>Note:</B> All the data in the returned stream must be     * read prior to getting the value of any other column. The next     * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a     * stream may return <code>0</code> when the method     * <code>InputStream.available</code>     * is called whether there is data available or not.     *     * @param columnIndex the first column is 1, the second is 2, and so on     * @return a Java input stream that delivers the database column value     * as a stream in Java UTF-8 byte format;     * if the value is SQL <code>NULL</code>, the value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     * @deprecated use <code>getCharacterStream</code> in place of     *              <code>getUnicodeStream</code>     */    public java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException {        checkState();         return rs.getUnicodeStream(columnIndex);    }     /**     * Gets the value of a column in the current row as a stream of     * the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as a binary stream of     * uninterpreted bytes. The value can then be read in chunks from the     * stream. This method is particularly     * suitable for retrieving large <code>LONGVARBINARY</code> values.     *     * <P><B>Note:</B> All the data in the returned stream must be     * read prior to getting the value of any other column. The next     * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a     * stream may return <code>0</code> when the method     * <code>InputStream.available</code>     * is called whether there is data available or not.     *     * @param columnIndex the first column is 1, the second is 2, and so on     * @return a Java input stream that delivers the database column value     * as a stream of uninterpreted bytes;     * if the value is SQL <code>NULL</code>, the value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public java.io.InputStream getBinaryStream(int columnIndex) throws SQLException {        checkState();         return rs.getBinaryStream(columnIndex);    }      //======================================================================    // Methods for accessing results by column name    //======================================================================     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>String</code>.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public String getString(String columnName) throws SQLException {        return getString(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>boolean</code>.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>false</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public boolean getBoolean(String columnName) throws SQLException {        return getBoolean(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>byte</code>.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>0</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public byte getByte(String columnName) throws SQLException {        return getByte(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>short</code>.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>0</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public short getShort(String columnName) throws SQLException {        return getShort(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * an <code>int</code>.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>0</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public int getInt(String columnName) throws SQLException {        return getInt(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>long</code>.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>0</code>     * @throws SQLException if a database access error occurs     *            or this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public long getLong(String columnName) throws SQLException {        return getLong(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>float</code>.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>0</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public float getFloat(String columnName) throws SQLException {        return getFloat(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>double</code>.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>0</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public double getDouble(String columnName) throws SQLException {        return getDouble(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>java.math.BigDecimal</code>.     *     * @param columnName the SQL name of the column     * @param scale the number of digits to the right of the decimal point     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) adatabase access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     * @deprecated     */    public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException {        return getBigDecimal(findColumn(columnName), scale);    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>byte</code> array in the Java programming language.     * The bytes represent the raw values returned by the driver.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public byte[] getBytes(String columnName) throws SQLException {        return getBytes(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>java.sql.Date</code> object in the Java programming language.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public java.sql.Date getDate(String columnName) throws SQLException {        return getDate(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>java.sql.Time</code> object in the Java programming language.     *     * @param columnName the SQL name of the column     * @return the column value;     * if the value is SQL <code>NULL</code>,     * the value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public java.sql.Time getTime(String columnName) throws SQLException {        return getTime(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as     * a <code>java.sql.Timestamp</code> object.     *     * @param columnName the SQL name of the column     * @return the column value; if the value is SQL <code>NULL</code>, the     * value returned is <code>null</code>     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public java.sql.Timestamp getTimestamp(String columnName) throws SQLException {        return getTimestamp(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as a stream of     * ASCII characters. The value can then be read in chunks from the     * stream. This method is particularly     * suitable for retrieving large <code>LONGVARCHAR</code> values.     * The JDBC driver will     * do any necessary conversion from the database format into ASCII.     *     * <P><B>Note:</B> All the data in the returned stream must be     * read prior to getting the value of any other column. The next     * call to a <code>getXXX</code> method implicitly closes the stream. Also, a     * stream may return <code>0</code> when the method <code>available</code>     * is called whether there is data available or not.     *     * @param columnName the SQL name of the column     * @return a Java input stream that delivers the database column value     * as a stream of one-byte ASCII characters.     * If the value is SQL <code>NULL</code>,     * the value returned is <code>null</code>.     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     */    public java.io.InputStream getAsciiStream(String columnName) throws SQLException {        return getAsciiStream(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as a stream of     * Unicode characters. The value can then be read in chunks from the     * stream. This method is particularly     * suitable for retrieving large <code>LONGVARCHAR</code> values.     * The JDBC driver will     * do any necessary conversion from the database format into Unicode.     * The byte format of the Unicode stream must be Java UTF-8,     * as defined in the Java virtual machine specification.     *     * <P><B>Note:</B> All the data in the returned stream must be     * read prior to getting the value of any other column. The next     * call to a <code>getXXX</code> method implicitly closes the stream. Also, a     * stream may return <code>0</code> when the method <code>available</code>     * is called whether there is data available or not.     *     * @param columnName the SQL name of the column     * @return a Java input stream that delivers the database column value     * as a stream of two-byte Unicode characters.     * If the value is SQL <code>NULL</code>,     * the value returned is <code>null</code>.     * @throws SQLException if (1) a database access error occurs     *            or (2) this rowset does not have a currently valid connection,     *            prepared statement, and result set     * @deprecated     */    public java.io.InputStream getUnicodeStream(String columnName) throws SQLException {        return getUnicodeStream(findColumn(columnName));    }     /**     * Gets the value of the designated column in the current row     * of this rowset's <code>ResultSet</code> object as a stream of uninterpreted     * <code>byte</code>s.     * The value can then be read in chunks from the     * stream. This method is particularly     * suitable for retrieving large <code>LONGVARBINARY</code>     * values.     *     * <P><B>Note:</B> All the data in the returned stream must be     * read prior to getting the value of any other column. The next     * call to a <code>getXXX</code> method implicitly closes the stream. Also, a     * stream may return <code>0</code> when the method <code>available</code>     * is called whether there is data available or not.     *     * @param columnName the SQL name of the column     * @return a Java input stream that delivers the database column value

Lines 1001–1500 of 7047. Previous lines