groovyresultset.java

来自「大名鼎鼎的java动态脚本语言。已经通过了sun的认证」· Java 代码 · 共 1,569 行 · 第 1/5 页

JAVA
1,569
字号
     * @since 1.2     */    public int getFetchDirection() throws SQLException {        return getResultSet().getFetchDirection();    }    /**     * Gives the JDBC driver a hint as to the number of rows that should     * be fetched from the database when more rows are needed for this     * <code>getResultSet()</code> object.     * If the fetch size specified is zero, the JDBC driver     * ignores the value and is free to make its own best guess as to what     * the fetch size should be.  The default value is set by the     * <code>Statement</code> object     * that created the result set.  The fetch size may be changed at any time.     *     * @param rows the number of rows to fetch     * @throws SQLException if a database access error occurs or the     *                      condition <code>0 <= rows <= Statement.getMaxRows()</code> is not satisfied     * @see #getFetchSize     * @since 1.2     */    public void setFetchSize(int rows) throws SQLException {        getResultSet().setFetchSize(rows);    }    /**     * Retrieves the fetch size for this     * <code>getResultSet()</code> object.     *     * @return the current fetch size for this <code>getResultSet()</code> object     * @throws SQLException if a database access error occurs     * @see #setFetchSize     * @since 1.2     */    public int getFetchSize() throws SQLException {        return getResultSet().getFetchSize();    }    /**     * Retrieves the type of this <code>getResultSet()</code> object.     * The type is determined by the <code>Statement</code> object     * that created the result set.     *     * @return <code>getResultSet().TYPE_FORWARD_ONLY</code>,     *         <code>getResultSet().TYPE_SCROLL_INSENSITIVE</code>,     *         or <code>getResultSet().TYPE_SCROLL_SENSITIVE</code>     * @throws SQLException if a database access error occurs     * @since 1.2     */    public int getType() throws SQLException {        return getResultSet().getType();    }    /**     * Retrieves the concurrency mode of this <code>getResultSet()</code> object.     * The concurrency used is determined by the     * <code>Statement</code> object that created the result set.     *     * @return the concurrency type, either     *         <code>getResultSet().CONCUR_READ_ONLY</code>     *         or <code>getResultSet().CONCUR_UPDATABLE</code>     * @throws SQLException if a database access error occurs     * @since 1.2     */    public int getConcurrency() throws SQLException {        return getResultSet().getConcurrency();    }    //---------------------------------------------------------------------    // Updates    //---------------------------------------------------------------------    /**     * Retrieves whether the current row has been updated.  The value returned     * depends on whether or not the result set can detect updates.     *     * @return <code>true</code> if both (1) the row has been visibly updated     *         by the owner or another and (2) updates are detected     * @throws SQLException if a database access error occurs     * @see DatabaseMetaData#updatesAreDetected     * @since 1.2     */    public boolean rowUpdated() throws SQLException {        return getResultSet().rowUpdated();    }    /**     * Retrieves whether the current row has had an insertion.     * The value returned depends on whether or not this     * <code>getResultSet()</code> object can detect visible inserts.     *     * @return <code>true</code> if a row has had an insertion     *         and insertions are detected; <code>false</code> otherwise     * @throws SQLException if a database access error occurs     * @see DatabaseMetaData#insertsAreDetected     * @since 1.2     */    public boolean rowInserted() throws SQLException {        return getResultSet().rowInserted();    }    /**     * Retrieves whether a row has been deleted.  A deleted row may leave     * a visible "hole" in a result set.  This method can be used to     * detect holes in a result set.  The value returned depends on whether     * or not this <code>getResultSet()</code> object can detect deletions.     *     * @return <code>true</code> if a row was deleted and deletions are detected;     *         <code>false</code> otherwise     * @throws SQLException if a database access error occurs     * @see DatabaseMetaData#deletesAreDetected     * @since 1.2     */    public boolean rowDeleted() throws SQLException {        return getResultSet().rowDeleted();    }    /**     * Gives a nullable column a null value.     * <p/>     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code>     * or <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateNull(int columnIndex) throws SQLException {        getResultSet().updateNull(columnIndex);    }    /**     * Updates the designated column with a <code>boolean</code> value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateBoolean(int columnIndex, boolean x) throws SQLException {        getResultSet().updateBoolean(columnIndex, x);    }    /**     * Updates the designated column with a <code>byte</code> value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateByte(int columnIndex, byte x) throws SQLException {        getResultSet().updateByte(columnIndex, x);    }    /**     * Updates the designated column with a <code>short</code> value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateShort(int columnIndex, short x) throws SQLException {        getResultSet().updateShort(columnIndex, x);    }    /**     * Updates the designated column with an <code>int</code> value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateInt(int columnIndex, int x) throws SQLException {        getResultSet().updateInt(columnIndex, x);    }    /**     * Updates the designated column with a <code>long</code> value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateLong(int columnIndex, long x) throws SQLException {        getResultSet().updateLong(columnIndex, x);    }    /**     * Updates the designated column with a <code>float</code> value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateFloat(int columnIndex, float x) throws SQLException {        getResultSet().updateFloat(columnIndex, x);    }    /**     * Updates the designated column with a <code>double</code> value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateDouble(int columnIndex, double x) throws SQLException {        getResultSet().updateDouble(columnIndex, x);    }    /**     * Updates the designated column with a <code>java.math.BigDecimal</code>     * value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {        getResultSet().updateBigDecimal(columnIndex, x);    }    /**     * Updates the designated column with a <code>String</code> value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateString(int columnIndex, String x) throws SQLException {        getResultSet().updateString(columnIndex, x);    }    /**     * Updates the designated column with a <code>byte</code> array value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateBytes(int columnIndex, byte x[]) throws SQLException {        getResultSet().updateBytes(columnIndex, x);    }    /**     * Updates the designated column with a <code>java.sql.Date</code> value.     * The updater methods are used to update column values in the     * current row or the insert row.  The updater methods do not     * update the underlying database; instead the <code>updateRow</code> or     * <code>insertRow</code> methods are called to update the database.     *     * @param columnIndex the first column is 1, the second is 2, ...     * @param x           the new column value     * @throws SQLException if a database access error occurs     * @since 1.2     */    public void updateDate(int columnIndex, java.sql.Date x) throws SQLException {        getResultSet().updateDate(columnIndex, x);    }    /** 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?