Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / MyDerby-10.3 / java / engine / org / apache / derby / iapi / jdbc / BrokeredCallableStatement.java
diff --git a/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement.java b/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement.java
new file mode 100644 (file)
index 0000000..7c82b5b
--- /dev/null
@@ -0,0 +1,250 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.jdbc.BrokeredCallableStatement\r
+\r
+   Licensed to the Apache Software Foundation (ASF) under one or more\r
+   contributor license agreements.  See the NOTICE file distributed with\r
+   this work for additional information regarding copyright ownership.\r
+   The ASF licenses this file to you under the Apache License, Version 2.0\r
+   (the "License"); you may not use this file except in compliance with\r
+   the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.jdbc;\r
+\r
+import java.sql.*;\r
+import java.math.BigDecimal;\r
+\r
+import java.util.Calendar;\r
+import java.util.Map;\r
+\r
+\r
+/**\r
+       JDBC 2 brokered CallableStatement\r
+ */\r
+public abstract class BrokeredCallableStatement extends BrokeredPreparedStatement\r
+          implements CallableStatement\r
+{\r
+\r
+       public BrokeredCallableStatement(BrokeredStatementControl control, String sql) throws SQLException {\r
+               super(control,sql);\r
+       }\r
+\r
+    public final void registerOutParameter(int parameterIndex,\r
+                                     int sqlType)\r
+        throws SQLException\r
+    {\r
+        getCallableStatement().registerOutParameter( parameterIndex, sqlType);\r
+    }\r
+\r
+    public final void registerOutParameter(int parameterIndex,\r
+                                     int sqlType,\r
+                                     int scale)\r
+        throws SQLException\r
+    {\r
+        getCallableStatement().registerOutParameter( parameterIndex, sqlType, scale);\r
+    }\r
+\r
+    public final boolean wasNull()\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().wasNull();\r
+    }\r
+\r
+    public final String getString(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getString( parameterIndex);\r
+    }\r
+\r
+    public final boolean getBoolean(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getBoolean( parameterIndex);\r
+    }\r
+\r
+    public final byte getByte(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getByte( parameterIndex);\r
+    }\r
+\r
+    public final short getShort(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getShort( parameterIndex);\r
+    }\r
+\r
+    public final int getInt(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getInt( parameterIndex);\r
+    }\r
+\r
+    public final long getLong(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getLong( parameterIndex);\r
+    }\r
+\r
+    public final float getFloat(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getFloat( parameterIndex);\r
+    }\r
+\r
+    public final double getDouble(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getDouble( parameterIndex);\r
+    }\r
+\r
+    public final BigDecimal getBigDecimal(int parameterIndex,\r
+                                              int scale)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getBigDecimal( parameterIndex, scale);\r
+    }\r
+\r
+    public final byte[] getBytes(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getBytes( parameterIndex);\r
+    }\r
+\r
+    public final Date getDate(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getDate( parameterIndex);\r
+    }\r
+\r
+    public final Date getDate(int parameterIndex,\r
+                        Calendar cal)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getDate( parameterIndex, cal);\r
+    }\r
+\r
+    public final Time getTime(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getTime( parameterIndex);\r
+    }\r
+\r
+    public final Timestamp getTimestamp(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getTimestamp( parameterIndex);\r
+    }\r
+\r
+    public final Object getObject(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getObject( parameterIndex);\r
+    }\r
+\r
+    public final BigDecimal getBigDecimal(int parameterIndex)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getBigDecimal( parameterIndex);\r
+    }\r
+\r
+    public final Object getObject(int i,\r
+                            Map map)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getObject( i, map);\r
+    }\r
+\r
+    public final Ref getRef(int i)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getRef( i);\r
+    }\r
+\r
+    public final Blob getBlob(int i)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getBlob( i);\r
+    }\r
+\r
+    public final Clob getClob(int i)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getClob( i);\r
+    }\r
+\r
+    public final Array getArray(int i)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getArray( i);\r
+    }\r
+\r
+    public final Time getTime(int parameterIndex,\r
+                        Calendar cal)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getTime( parameterIndex, cal);\r
+    }\r
+\r
+    public final Timestamp getTimestamp(int parameterIndex,\r
+                                  Calendar cal)\r
+        throws SQLException\r
+    {\r
+        return getCallableStatement().getTimestamp( parameterIndex, cal);\r
+    }\r
+\r
+    public final void registerOutParameter(int paramIndex,\r
+                                     int sqlType,\r
+                                     String typeName)\r
+        throws SQLException\r
+    {\r
+        getCallableStatement().registerOutParameter( paramIndex, sqlType, typeName);\r
+    }\r
+\r
+       /*\r
+       ** Control methods\r
+       */\r
+\r
+    /**\r
+     * Access the underlying CallableStatement. This method\r
+     * is package protected to restrict access to the underlying\r
+     * object to the brokered objects. Allowing the application to\r
+     * access the underlying object thtough a public method would\r
+     * \r
+     */\r
+    final CallableStatement getCallableStatement() throws SQLException {\r
+               return control.getRealCallableStatement();\r
+       }\r
+       \r
+    /**\r
+     * Access the underlying PreparedStatement. This method\r
+     * is package protected to restrict access to the underlying\r
+     * object to the brokered objects. Allowing the application to\r
+     * access the underlying object thtough a public method would\r
+     * \r
+     */\r
+    final PreparedStatement getPreparedStatement() throws SQLException {\r
+               return getCallableStatement();\r
+       }\r
+       /**\r
+               Create a duplicate CalableStatement to this, including state, from the passed in Connection.\r
+       */\r
+       public CallableStatement createDuplicateStatement(Connection conn, CallableStatement oldStatement) throws SQLException {\r
+\r
+               CallableStatement newStatement = conn.prepareCall(sql, resultSetType, resultSetConcurrency);\r
+\r
+               setStatementState(oldStatement, newStatement);\r
+\r
+               return newStatement;\r
+       }\r
+}\r