4512 lines · 210.7 KB · Java
RawDownload
     * as it is undefined in this class.     * <P>     * Calls made to the method <code>getParams</code> after this version     * of <code>setDate</code>     * has been called will return an array with the value to be set for     * placeholder parameter number <i>parameterIndex</i> being the <code>Date</code>     * object supplied as the second parameter.     * Note that because the numbering of elements in an array starts at zero,     * the array element that corresponds to placeholder parameter number     * <i>parameterIndex</i> is <i>parameterIndex</i> -1.     *     * @param parameterIndex the ordinal number of the placeholder parameter     *        in this <code>RowSet</code> object's command that is to be set.     *        The first parameter is 1, the second is 2, and so on; must be     *        <code>1</code> or greater     * @param x the parameter value     * @throws SQLException if an error occurs or the     *                         parameter index is out of bounds     * @see #getParams     */    public void setDate(int parameterIndex, java.sql.Date x) throws SQLException {        checkParamIndex(parameterIndex);         if(params == null){             throw new SQLException("Set initParams() before setDate");        }        params.put(Integer.valueOf(parameterIndex - 1), x);    }     /**     * Sets the designated parameter to the given <code>java.sql.Time</code>     * value.  The driver converts this to an SQL <code>TIME</code> value     * when it sends it to the database.     * <P>     * The parameter value set by this method is stored internally and     * will be supplied as the appropriate parameter in this <code>RowSet</code>     * object's command when the method <code>execute</code> is called.     * Methods such as <code>execute</code> and <code>populate</code> must be     * provided in any class that extends this class and implements one or     * more of the standard JSR-114 <code>RowSet</code> interfaces.     * <P>     * NOTE: <code>JdbcRowSet</code> does not require the <code>populate</code> method     * as it is undefined in this class.     * <P>     * Calls made to the method <code>getParams</code> after this version     * of the method <code>setTime</code>     * has been called will return an array of the parameters that have been set.     * The parameter to be set for parameter placeholder number <i>parameterIndex</i>     * will be the <code>Time</code> object that was set as the second parameter     * to this method.     * <P>     * Note that because the numbering of elements in an array starts at zero,     * the array element that corresponds to placeholder parameter number     * <i>parameterIndex</i> is <i>parameterIndex</i> -1.     *     * @param parameterIndex the ordinal number of the placeholder parameter     *        in this <code>RowSet</code> object's command that is to be set.     *        The first parameter is 1, the second is 2, and so on; must be     *        <code>1</code> or greater     * @param x a <code>java.sql.Time</code> object, which is to be set as the value     *              for placeholder parameter <i>parameterIndex</i>     * @throws SQLException if an error occurs or the     *                         parameter index is out of bounds     * @see #getParams     */    public void setTime(int parameterIndex, java.sql.Time x) throws SQLException {        checkParamIndex(parameterIndex);        if(params == null){             throw new SQLException("Set initParams() before setTime");        }         params.put(Integer.valueOf(parameterIndex - 1), x);    }     /**     * Sets the designated parameter to the given     * <code>java.sql.Timestamp</code> value.     * The driver converts this to an SQL <code>TIMESTAMP</code> value when it     * sends it to the database.     * <P>     * The parameter value set by this method is stored internally and     * will be supplied as the appropriate parameter in this <code>RowSet</code>     * object's command when the method <code>execute</code> is called.     * Methods such as <code>execute</code> and <code>populate</code> must be     * provided in any class that extends this class and implements one or     * more of the standard JSR-114 <code>RowSet</code> interfaces.     * <P>     * NOTE: <code>JdbcRowSet</code> does not require the <code>populate</code> method     * as it is undefined in this class.     * <P>     * Calls made to the method <code>getParams</code> after this version of     * <code>setTimestamp</code>     * has been called will return an array with the value for parameter placeholder     * number <i>parameterIndex</i> being the <code>Timestamp</code> object that was     * supplied as the second parameter to this method.     * Note that because the numbering of elements in an array starts at zero,     * the array element that corresponds to placeholder parameter number     * <i>parameterIndex</i> is <i>parameterIndex</i> -1.     *     * @param parameterIndex the ordinal number of the placeholder parameter     *        in this <code>RowSet</code> object's command that is to be set.     *        The first parameter is 1, the second is 2, and so on; must be     *        <code>1</code> or greater     * @param x a <code>java.sql.Timestamp</code> object     * @throws SQLException if an error occurs or the     *                         parameter index is out of bounds     * @see #getParams     */    public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws SQLException {        checkParamIndex(parameterIndex);        if(params == null){             throw new SQLException("Set initParams() before setTimestamp");        }         params.put(Integer.valueOf(parameterIndex - 1), x);    }     /**     * Sets the designated parameter to the given     * <code>java.io.InputStream</code> object,     * which will have the specified number of bytes.     * The contents of the stream will be read and sent to the database.     * This method throws an <code>SQLException</code> object if the number of bytes     * read and sent to the database is not equal to <i>length</i>.     * <P>     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>     * parameter, it may be more practical to send it via a     * <code>java.io.InputStream</code> object. A JDBC technology-enabled     * driver will read the data from the stream as needed until it reaches     * end-of-file. The driver will do any necessary conversion from ASCII to     * the database <code>CHAR</code> format.     *     * <P><B>Note:</B> This stream object can be either a standard     * Java stream object or your own subclass that implements the     * standard interface.     * <P>     * The parameter value set by this method is stored internally and     * will be supplied as the appropriate parameter in this <code>RowSet</code>     * object's command when the method <code>execute</code> is called.     * Methods such as <code>execute</code> and <code>populate</code> must be     * provided in any class that extends this class and implements one or     * more of the standard JSR-114 <code>RowSet</code> interfaces.     * <P>     * Note: <code>JdbcRowSet</code> does not require the <code>populate</code> method     * as it is undefined in this class.     * <P>     * Calls made to the method <code>getParams</code> after <code>setAsciiStream</code>     * has been called will return an array containing the parameter values that     * have been set.  The element in the array that represents the values     * set with this method will itself be an array. The first element of that array     * is the given <code>java.io.InputStream</code> object.     * The second element is the value set for <i>length</i>.     * The third element is an internal <code>BaseRowSet</code> constant     * specifying that the stream passed to this method is an ASCII stream.     * The parameter number is indicated by an element's position in the array     * returned by the method <code>getParams</code>,     * with the first element being the value for the first placeholder parameter, the     * second element being the value for the second placeholder parameter, and so on.     * In other words, if the input stream being set is the value for the second     * placeholder parameter, the array containing it will be the second element in     * the array returned by <code>getParams</code>.     * <P>     * Note that because the numbering of elements in an array starts at zero,     * the array element that corresponds to placeholder parameter number     * <i>parameterIndex</i> is element number <i>parameterIndex</i> -1.     *     * @param parameterIndex the ordinal number of the placeholder parameter     *        in this <code>RowSet</code> object's command that is to be set.     *        The first parameter is 1, the second is 2, and so on; must be     *        <code>1</code> or greater     * @param x the Java input stream that contains the ASCII parameter value     * @param length the number of bytes in the stream. This is the number of bytes     *       the driver will send to the DBMS; lengths of 0 or less are     *       are undefined but will cause an invalid length exception to be     *       thrown in the underlying JDBC driver.     * @throws SQLException if an error occurs, the parameter index is out of bounds,     *       or when connected to a data source, the number of bytes the driver reads     *       and sends to the database is not equal to the number of bytes specified     *       in <i>length</i>     * @see #getParams     */    public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException {        Object asciiStream[];        checkParamIndex(parameterIndex);         asciiStream = new Object[3];        asciiStream[0] = x;        asciiStream[1] = Integer.valueOf(length);        asciiStream[2] = Integer.valueOf(ASCII_STREAM_PARAM);         if(params == null){             throw new SQLException("Set initParams() before setAsciiStream");        }         params.put(Integer.valueOf(parameterIndex - 1), asciiStream);    }   /**   * Sets the designated parameter in this <code>RowSet</code> object's command   * to the given input stream.   * When a very large ASCII value is input to a <code>LONGVARCHAR</code>   * parameter, it may be more practical to send it via a   * <code>java.io.InputStream</code>. Data will be read from the stream   * as needed until end-of-file is reached.  The JDBC driver will   * do any necessary conversion from ASCII to the database char format.   *   * <P><B>Note:</B> This stream object can either be a standard   * Java stream object or your own subclass that implements the   * standard interface.   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if   * it might be more efficient to use a version of   * <code>setAsciiStream</code> which takes a length parameter.   *   * @param parameterIndex the first parameter is 1, the second is 2, ...   * @param x the Java input stream that contains the ASCII parameter value   * @exception SQLException if a database access error occurs or   * this method is called on a closed <code>PreparedStatement</code>   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method   * @since 1.6   */  public void setAsciiStream(int parameterIndex, java.io.InputStream x)                      throws SQLException {      throw new SQLFeatureNotSupportedException("Feature not supported");  }     /**     * Sets the designated parameter to the given <code>java.io.InputStream</code>     * object, which will have the specified number of bytes.     * The contents of the stream will be read and sent to the database.     * This method throws an <code>SQLException</code> object if the number of bytes     * read and sent to the database is not equal to <i>length</i>.     * <P>     * When a very large binary value is input to a     * <code>LONGVARBINARY</code> parameter, it may be more practical     * to send it via a <code>java.io.InputStream</code> object.     * A JDBC technology-enabled driver will read the data from the     * stream as needed until it reaches end-of-file.     *     * <P><B>Note:</B> This stream object can be either a standard     * Java stream object or your own subclass that implements the     * standard interface.     * <P>     * The parameter value set by this method is stored internally and     * will be supplied as the appropriate parameter in this <code>RowSet</code>     * object's command when the method <code>execute</code> is called.     * Methods such as <code>execute</code> and <code>populate</code> must be     * provided in any class that extends this class and implements one or     * more of the standard JSR-114 <code>RowSet</code> interfaces.     *<P>     * NOTE: <code>JdbcRowSet</code> does not require the <code>populate</code> method     * as it is undefined in this class.     * <P>     * Calls made to the method <code>getParams</code> after <code>setBinaryStream</code>     * has been called will return an array containing the parameter values that     * have been set.  In that array, the element that represents the values     * set with this method will itself be an array. The first element of that array     * is the given <code>java.io.InputStream</code> object.     * The second element is the value set for <i>length</i>.     * The third element is an internal <code>BaseRowSet</code> constant     * specifying that the stream passed to this method is a binary stream.     * The parameter number is indicated by an element's position in the array     * returned by the method <code>getParams</code>,     * with the first element being the value for the first placeholder parameter, the     * second element being the value for the second placeholder parameter, and so on.     * In other words, if the input stream being set is the value for the second     * placeholder parameter, the array containing it will be the second element in     * the array returned by <code>getParams</code>.     * <P>     * Note that because the numbering of elements in an array starts at zero,     * the array element that corresponds to placeholder parameter number     * <i>parameterIndex</i> is element number <i>parameterIndex</i> -1.     *     * @param parameterIndex the ordinal number of the placeholder parameter     *        in this <code>RowSet</code> object's command that is to be set.     *        The first parameter is 1, the second is 2, and so on; must be     *        <code>1</code> or greater     * @param x the input stream that contains the binary value to be set     * @param length the number of bytes in the stream; lengths of 0 or less are     *         are undefined but will cause an invalid length exception to be     *         thrown in the underlying JDBC driver.     * @throws SQLException if an error occurs, the parameter index is out of bounds,     *         or when connected to a data source, the number of bytes the driver     *         reads and sends to the database is not equal to the number of bytes     *         specified in <i>length</i>     * @see #getParams     */    public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException {        Object binaryStream[];        checkParamIndex(parameterIndex);         binaryStream = new Object[3];        binaryStream[0] = x;        binaryStream[1] = Integer.valueOf(length);        binaryStream[2] = Integer.valueOf(BINARY_STREAM_PARAM);        if(params == null){             throw new SQLException("Set initParams() before setBinaryStream");        }         params.put(Integer.valueOf(parameterIndex - 1), binaryStream);    }     /**   * Sets the designated parameter in this <code>RowSet</code> object's command   * to the given input stream.   * When a very large binary value is input to a <code>LONGVARBINARY</code>   * parameter, it may be more practical to send it via a   * <code>java.io.InputStream</code> object. The data will be read from the   * stream as needed until end-of-file is reached.   *   * <P><B>Note:</B> This stream object can either be a standard   * Java stream object or your own subclass that implements the   * standard interface.   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if   * it might be more efficient to use a version of   * <code>setBinaryStream</code> which takes a length parameter.   *   * @param parameterIndex the first parameter is 1, the second is 2, ...   * @param x the java input stream which contains the binary parameter value   * @exception SQLException if a database access error occurs or   * this method is called on a closed <code>PreparedStatement</code>   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method   * @since 1.6   */  public void setBinaryStream(int parameterIndex, java.io.InputStream x)                              throws SQLException {      throw new SQLFeatureNotSupportedException("Feature not supported");  }      /**     * Sets the designated parameter to the given     * <code>java.io.InputStream</code> object, which will have the specified     * number of bytes. The contents of the stream will be read and sent     * to the database.     * This method throws an <code>SQLException</code> if the number of bytes     * read and sent to the database is not equal to <i>length</i>.     * <P>     * When a very large Unicode value is input to a     * <code>LONGVARCHAR</code> parameter, it may be more practical     * to send it via a <code>java.io.InputStream</code> object.     * A JDBC technology-enabled driver will read the data from the     * stream as needed, until it reaches end-of-file.     * The driver will do any necessary conversion from Unicode to the     * database <code>CHAR</code> format.     * The byte format of the Unicode stream must be Java UTF-8, as     * defined in the Java Virtual Machine Specification.     *     * <P><B>Note:</B> This stream object can be either a standard     * Java stream object or your own subclass that implements the     * standard interface.     * <P>     * This method is deprecated; the method <code>getCharacterStream</code>     * should be used in its place.     * <P>     * The parameter value set by this method is stored internally and     * will be supplied as the appropriate parameter in this <code>RowSet</code>     * object's command when the method <code>execute</code> is called.     * Calls made to the method <code>getParams</code> after <code>setUnicodeStream</code>     * has been called will return an array containing the parameter values that     * have been set.  In that array, the element that represents the values     * set with this method will itself be an array. The first element of that array     * is the given <code>java.io.InputStream</code> object.     * The second element is the value set for <i>length</i>.     * The third element is an internal <code>BaseRowSet</code> constant     * specifying that the stream passed to this method is a Unicode stream.     * The parameter number is indicated by an element's position in the array     * returned by the method <code>getParams</code>,     * with the first element being the value for the first placeholder parameter, the     * second element being the value for the second placeholder parameter, and so on.     * In other words, if the input stream being set is the value for the second     * placeholder parameter, the array containing it will be the second element in     * the array returned by <code>getParams</code>.     * <P>     * Note that because the numbering of elements in an array starts at zero,     * the array element that corresponds to placeholder parameter number     * <i>parameterIndex</i> is element number <i>parameterIndex</i> -1.     *     * @param parameterIndex the ordinal number of the placeholder parameter     *        in this <code>RowSet</code> object's command that is to be set.     *        The first parameter is 1, the second is 2, and so on; must be     *        <code>1</code> or greater     * @param x the <code>java.io.InputStream</code> object that contains the     *          UNICODE parameter value     * @param length the number of bytes in the input stream     * @throws SQLException if an error occurs, the parameter index is out of bounds,     *         or the number of bytes the driver reads and sends to the database is     *         not equal to the number of bytes specified in <i>length</i>     * @deprecated getCharacterStream should be used in its place     * @see #getParams     */     public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException {        Object unicodeStream[];        checkParamIndex(parameterIndex);         unicodeStream = new Object[3];        unicodeStream[0] = x;        unicodeStream[1] = Integer.valueOf(length);        unicodeStream[2] = Integer.valueOf(UNICODE_STREAM_PARAM);        if(params == null){             throw new SQLException("Set initParams() before setUnicodeStream");        }        params.put(Integer.valueOf(parameterIndex - 1), unicodeStream);    }     /**     * Sets the designated parameter to the given <code>java.io.Reader</code>     * object, which will have the specified number of characters. The     * contents of the reader will be read and sent to the database.     * This method throws an <code>SQLException</code> if the number of bytes     * read and sent to the database is not equal to <i>length</i>.     * <P>     * When a very large Unicode value is input to a     * <code>LONGVARCHAR</code> parameter, it may be more practical     * to send it via a <code>Reader</code> object.     * A JDBC technology-enabled driver will read the data from the     * stream as needed until it reaches end-of-file.     * The driver will do any necessary conversion from Unicode to the     * database <code>CHAR</code> format.     * The byte format of the Unicode stream must be Java UTF-8, as     * defined in the Java Virtual Machine Specification.     *     * <P><B>Note:</B> This stream object can be either a standard     * Java stream object or your own subclass that implements the     * standard interface.     * <P>     * The parameter value set by this method is stored internally and     * will be supplied as the appropriate parameter in this <code>RowSet</code>     * object's command when the method <code>execute</code> is called.     * Methods such as <code>execute</code> and <code>populate</code> must be     * provided in any class that extends this class and implements one or     * more of the standard JSR-114 <code>RowSet</code> interfaces.     * <P>     * NOTE: <code>JdbcRowSet</code> does not require the <code>populate</code> method     * as it is undefined in this class.     * <P>     * Calls made to the method <code>getParams</code> after     * <code>setCharacterStream</code>     * has been called will return an array containing the parameter values that     * have been set.  In that array, the element that represents the values     * set with this method will itself be an array. The first element of that array     * is the given <code>java.io.Reader</code> object.     * The second element is the value set for <i>length</i>.     * The parameter number is indicated by an element's position in the array     * returned by the method <code>getParams</code>,     * with the first element being the value for the first placeholder parameter, the     * second element being the value for the second placeholder parameter, and so on.     * In other words, if the reader being set is the value for the second     * placeholder parameter, the array containing it will be the second element in     * the array returned by <code>getParams</code>.     * <P>     * Note that because the numbering of elements in an array starts at zero,     * the array element that corresponds to placeholder parameter number     * <i>parameterIndex</i> is element number <i>parameterIndex</i> -1.     *     * @param parameterIndex the ordinal number of the placeholder parameter     *        in this <code>RowSet</code> object's command that is to be set.     *        The first parameter is 1, the second is 2, and so on; must be     *        <code>1</code> or greater     * @param reader the <code>Reader</code> object that contains the     *        Unicode data     * @param length the number of characters in the stream; lengths of 0 or     *        less are undefined but will cause an invalid length exception to     *        be thrown in the underlying JDBC driver.     * @throws SQLException if an error occurs, the parameter index is out of bounds,     *        or when connected to a data source, the number of bytes the driver     *        reads and sends to the database is not equal to the number of bytes     *        specified in <i>length</i>     * @see #getParams     */    public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {        Object charStream[];        checkParamIndex(parameterIndex);         charStream = new Object[2];        charStream[0] = reader;        charStream[1] = Integer.valueOf(length);        if(params == null){             throw new SQLException("Set initParams() before setCharacterStream");        }        params.put(Integer.valueOf(parameterIndex - 1), charStream);    }    /**   * Sets the designated parameter in this <code>RowSet</code> object's command   * to the given <code>Reader</code>   * object.   * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>   * parameter, it may be more practical to send it via a   * <code>java.io.Reader</code> object. The data will be read from the stream   * as needed until end-of-file is reached.  The JDBC driver will   * do any necessary conversion from UNICODE to the database char format.   *   * <P><B>Note:</B> This stream object can either be a standard   * Java stream object or your own subclass that implements the   * standard interface.   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if   * it might be more efficient to use a version of   * <code>setCharacterStream</code> which takes a length parameter.

Lines 2001–2500 of 4512. Previous lines