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

📄 netpreparedstatement.java

📁 derby database source code.good for you.
💻 JAVA
字号:
/*   Derby - Class org.apache.derby.client.net.NetPreparedStatement   Copyright (c) 2001, 2005 The Apache Software Foundation or its licensors, where applicable.   Licensed under the Apache License, Version 2.0 (the "License");   you may not use this file except in compliance with the License.   You may obtain a copy of the License at      http://www.apache.org/licenses/LICENSE-2.0   Unless required by applicable law or agreed to in writing, software   distributed under the License is distributed on an "AS IS" BASIS,   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and   limitations under the License.*/package org.apache.derby.client.net;import org.apache.derby.client.am.ColumnMetaData;import org.apache.derby.client.am.PreparedStatement;import org.apache.derby.client.am.Section;import org.apache.derby.client.am.SqlException;public class NetPreparedStatement extends NetStatement        implements org.apache.derby.client.am.MaterialPreparedStatement {    // Alias for (NetPreparedStatement) super.statement.    /*final*/    org.apache.derby.client.am.PreparedStatement preparedStatement_;    // Relay constructor for NetCallableStatement.    NetPreparedStatement(org.apache.derby.client.am.PreparedStatement statement,                         NetAgent netAgent,                         NetConnection netConnection) {        super(statement, netAgent, netConnection);        initNetPreparedStatement(statement);    }    void resetNetPreparedStatement(org.apache.derby.client.am.PreparedStatement statement,                                   NetAgent netAgent,                                   NetConnection netConnection) {        super.resetNetStatement(statement, netAgent, netConnection);        initNetPreparedStatement(statement);    }    private void initNetPreparedStatement(org.apache.derby.client.am.PreparedStatement statement) {        preparedStatement_ = statement;        preparedStatement_.materialPreparedStatement_ = this;    }    // Called by abstract Connection.prepareStatment().newPreparedStatement() for jdbc 2 prepared statements    // with scroll attributes.    NetPreparedStatement(NetAgent netAgent, NetConnection netConnection, String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames) throws SqlException {        this(new PreparedStatement(netAgent, netConnection, sql, type, concurrency, holdability, autoGeneratedKeys, columnNames),                netAgent,                netConnection);    }    void resetNetPreparedStatement(NetAgent netAgent, NetConnection netConnection, String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames) throws SqlException {        preparedStatement_.resetPreparedStatement(netAgent, netConnection, sql, type, concurrency, holdability, autoGeneratedKeys, columnNames);        resetNetPreparedStatement(preparedStatement_, netAgent, netConnection);    }    // For JDBC 3.0 positioned updates.    NetPreparedStatement(NetAgent netAgent,                         NetConnection netConnection,                         String sql,                         Section section) throws SqlException {        this(new PreparedStatement(netAgent, netConnection, sql, section),                netAgent,                netConnection);    }    void resetNetPreparedStatement(NetAgent netAgent,                                   NetConnection netConnection,                                   String sql,                                   Section section) throws SqlException {        preparedStatement_.resetPreparedStatement(netAgent, netConnection, sql, section);        resetNetPreparedStatement(preparedStatement_, netAgent, netConnection);    }    void resetNetPreparedStatement(NetAgent netAgent,                                   NetConnection netConnection,                                   String sql,                                   Section section,                                   ColumnMetaData parameterMetaData,                                   ColumnMetaData resultSetMetaData) throws SqlException {        preparedStatement_.resetPreparedStatement(netAgent, netConnection, sql, section, parameterMetaData, resultSetMetaData);        this.resetNetPreparedStatement(preparedStatement_, netAgent, netConnection);    }    protected void finalize() throws java.lang.Throwable {        super.finalize();    }    public void writeExecute_(Section section,                              ColumnMetaData parameterMetaData,                              Object[] inputs,                              int numInputColumns,                              boolean outputExpected,                              // This is a hint to the material layer that more write commands will follow.                              // It is ignored by the driver in all cases except when blob data is written,                              // in which case this boolean is used to optimize the implementation.                              // Otherwise we wouldn't be able to chain after blob data is sent.                              // If we could always chain a no-op DDM after every execute that writes blobs                              // then we could just always set the chaining flag to on for blob send data                              boolean chainedWritesFollowingSetLob) throws SqlException {        netAgent_.statementRequest_.writeExecute(this,                section,                parameterMetaData,                inputs,                numInputColumns,                outputExpected,                chainedWritesFollowingSetLob);    }    public void readExecute_() throws SqlException {        netAgent_.statementReply_.readExecute(preparedStatement_);    }    public void writeOpenQuery_(Section section,                                int fetchSize,                                int resultSetType,                                int numInputColumns,                                ColumnMetaData parameterMetaData,                                Object[] inputs) throws SqlException {        netAgent_.statementRequest_.writeOpenQuery(this,                section,                fetchSize,                resultSetType,                numInputColumns,                parameterMetaData,                inputs);    }    // super.readOpenQuery()    public void writeDescribeInput_(Section section) throws SqlException {        netAgent_.statementRequest_.writeDescribeInput(this, section);    }    public void readDescribeInput_() throws SqlException {        netAgent_.statementReply_.readDescribeInput(preparedStatement_);    }    public void writeDescribeOutput_(Section section) throws SqlException {        netAgent_.statementRequest_.writeDescribeOutput(this, section);    }    public void readDescribeOutput_() throws SqlException {        netAgent_.statementReply_.readDescribeOutput(preparedStatement_);    }}

⌨️ 快捷键说明

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