1 21 package org.apache.derby.client.net; 22 23 import org.apache.derby.client.am.CallableStatement; 24 import org.apache.derby.client.am.ColumnMetaData; 25 import org.apache.derby.client.am.MaterialPreparedStatement; 26 import org.apache.derby.client.am.Section; 27 import org.apache.derby.client.am.SqlException; 28 import org.apache.derby.jdbc.ClientDriver; 29 import org.apache.derby.client.am.ClientJDBCObjectFactory; 30 import org.apache.derby.client.ClientPooledConnection; 31 32 public class NetCallableStatement extends NetPreparedStatement 33 implements MaterialPreparedStatement { 34 35 CallableStatement callableStatement_; 36 37 39 41 private void initNetCallableStatement() { 42 callableStatement_ = null; 43 } 44 45 NetCallableStatement(CallableStatement statement, 47 NetAgent netAgent, 48 NetConnection netConnection) throws SqlException { 49 super(statement, netAgent, netConnection); 50 initNetCallableStatement(); 51 initNetCallableStatement(statement); 52 } 53 54 void resetNetCallableStatement(CallableStatement statement, 55 NetAgent netAgent, 56 NetConnection netConnection) throws SqlException { 57 super.resetNetPreparedStatement(statement, netAgent, netConnection); 58 initNetCallableStatement(); 59 initNetCallableStatement(statement); 60 } 61 62 private void initNetCallableStatement(CallableStatement statement) throws SqlException { 63 callableStatement_ = statement; 64 callableStatement_.materialCallableStatement_ = this; 65 66 } 67 68 69 NetCallableStatement(NetAgent netAgent, 72 NetConnection netConnection, 73 String sql, 74 int type, 75 int concurrency, 76 int holdability, 77 ClientPooledConnection cpc) throws SqlException { 78 this(ClientDriver.getFactory().newCallableStatement(netAgent, 79 netConnection, sql, type, concurrency, holdability,cpc), 80 netAgent, 81 netConnection); 82 } 83 84 void resetNetCallableStatement(NetAgent netAgent, 85 NetConnection netConnection, 86 String sql, 87 int type, 88 int concurrency, 89 int holdability) throws SqlException { 90 callableStatement_.resetCallableStatement(netAgent, netConnection, sql, type, concurrency, holdability); 91 resetNetCallableStatement(callableStatement_, netAgent, netConnection); 92 } 93 94 void resetNetCallableStatement(NetAgent netAgent, 95 NetConnection netConnection, 96 String sql, 97 Section section) throws SqlException { 98 callableStatement_.resetCallableStatement(netAgent, netConnection, sql, section); 99 resetNetCallableStatement(callableStatement_, netAgent, netConnection); 100 } 101 102 103 void resetNetCallableStatement(NetAgent netAgent, 104 NetConnection netConnection, 105 String sql, 106 Section section, 107 ColumnMetaData parameterMetaData, 108 ColumnMetaData resultSetMetaData) throws SqlException { 109 callableStatement_.resetCallableStatement(netAgent, netConnection, sql, section, parameterMetaData, resultSetMetaData); 110 resetNetCallableStatement(callableStatement_, netAgent, netConnection); 111 } 112 113 protected void finalize() throws java.lang.Throwable { 114 super.finalize(); 115 } 116 117 } 118 | Popular Tags |