⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 statementwrapper.java

📁 基于java的oa系统
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
                return this.wrappedStmt.getResultSetConcurrency();            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return 0;    }    /* (non-Javadoc)     * @see java.sql.Statement#getResultSetHoldability()     */    public int getResultSetHoldability() throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.getResultSetHoldability();            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return Statement.CLOSE_CURRENT_RESULT;    }    /* (non-Javadoc)     * @see java.sql.Statement#getResultSetType()     */    public int getResultSetType() throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.getResultSetType();            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return ResultSet.TYPE_FORWARD_ONLY;    }    /* (non-Javadoc)     * @see java.sql.Statement#getUpdateCount()     */    public int getUpdateCount() throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.getUpdateCount();            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return -1;    }    /* (non-Javadoc)     * @see java.sql.Statement#getWarnings()     */    public SQLWarning getWarnings() throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.getWarnings();            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return null;    }    /* (non-Javadoc)     * @see java.sql.Statement#addBatch(java.lang.String)     */    public void addBatch(String sql) throws SQLException {        try {            if (this.wrappedStmt != null) {                this.wrappedStmt.addBatch(sql);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }    }    /* (non-Javadoc)     * @see java.sql.Statement#cancel()     */    public void cancel() throws SQLException {        try {            if (this.wrappedStmt != null) {                this.wrappedStmt.cancel();            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }    }    /* (non-Javadoc)     * @see java.sql.Statement#clearBatch()     */    public void clearBatch() throws SQLException {        try {            if (this.wrappedStmt != null) {                this.wrappedStmt.clearBatch();            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }    }    /* (non-Javadoc)     * @see java.sql.Statement#clearWarnings()     */    public void clearWarnings() throws SQLException {        try {            if (this.wrappedStmt != null) {                this.wrappedStmt.clearWarnings();            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }    }    /* (non-Javadoc)     * @see java.sql.Statement#close()     */    public void close() throws SQLException {        try {            if (this.wrappedStmt != null) {                this.wrappedStmt.close();            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        } finally {            this.wrappedStmt = null;            this.pooledConnection = null;        }    }    /* (non-Javadoc)     * @see java.sql.Statement#execute(java.lang.String, int)     */    public boolean execute(String sql, int autoGeneratedKeys)        throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.execute(sql, autoGeneratedKeys);            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return false; // we actually never get here, but the compiler can't figure         // that out    }    /* (non-Javadoc)     * @see java.sql.Statement#execute(java.lang.String, int[])     */    public boolean execute(String sql, int[] columnIndexes)        throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.execute(sql, columnIndexes);            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return false; // we actually never get here, but the compiler can't figure         // that out    }    /* (non-Javadoc)     * @see java.sql.Statement#execute(java.lang.String, java.lang.String[])     */    public boolean execute(String sql, String[] columnNames)        throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.execute(sql, columnNames);            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return false; // we actually never get here, but the compiler can't figure         // that out    }    /* (non-Javadoc)     * @see java.sql.Statement#execute(java.lang.String)     */    public boolean execute(String sql) throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.execute(sql);            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return false; // we actually never get here, but the compiler can't figure         // that out    }    /* (non-Javadoc)     * @see java.sql.Statement#executeBatch()     */    public int[] executeBatch() throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.executeBatch();            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return null; // we actually never get here, but the compiler can't figure         // that out    }    /* (non-Javadoc)     * @see java.sql.Statement#executeQuery(java.lang.String)     */    public ResultSet executeQuery(String sql) throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.executeQuery(sql);            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return null; // we actually never get here, but the compiler can't figure         // that out    }    /* (non-Javadoc)     * @see java.sql.Statement#executeUpdate(java.lang.String, int)     */    public int executeUpdate(String sql, int autoGeneratedKeys)        throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.executeUpdate(sql, autoGeneratedKeys);            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return -1; // we actually never get here, but the compiler can't figure         // that out    }    /* (non-Javadoc)     * @see java.sql.Statement#executeUpdate(java.lang.String, int[])     */    public int executeUpdate(String sql, int[] columnIndexes)        throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.executeUpdate(sql, columnIndexes);            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return -1; // we actually never get here, but the compiler can't figure         // that out    }    /* (non-Javadoc)     * @see java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[])     */    public int executeUpdate(String sql, String[] columnNames)        throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.executeUpdate(sql, columnNames);            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return -1; // we actually never get here, but the compiler can't figure         // that out    }    /* (non-Javadoc)     * @see java.sql.Statement#executeUpdate(java.lang.String)     */    public int executeUpdate(String sql) throws SQLException {        try {            if (this.wrappedStmt != null) {                return this.wrappedStmt.executeUpdate(sql);            } else {                throw new SQLException("Statement already closed",                    SQLError.SQL_STATE_ILLEGAL_ARGUMENT);            }        } catch (SQLException sqlEx) {            checkAndFireConnectionError(sqlEx);        }        return -1; // we actually never get here, but the compiler can't figure         // that out    }}

⌨️ 快捷键说明

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