Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / MyDerby-10.3 / java / engine / org / apache / derby / iapi / jdbc / BrokeredConnection30.java
diff --git a/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection30.java b/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection30.java
new file mode 100644 (file)
index 0000000..f9c4ccb
--- /dev/null
@@ -0,0 +1,305 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.jdbc.BrokeredConnection30\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.Array;\r
+import java.sql.Blob;\r
+import java.sql.Clob;\r
+import java.sql.NClob;\r
+import java.sql.SQLClientInfoException;\r
+import java.sql.SQLXML;\r
+import java.sql.Statement;\r
+import java.sql.PreparedStatement;\r
+import java.sql.CallableStatement;\r
+import java.sql.SQLException;\r
+import java.sql.Savepoint;\r
+import java.sql.Struct;\r
+import java.util.Map;\r
+import java.util.Properties;\r
+import java.util.concurrent.Executor;\r
+\r
+import org.apache.derby.iapi.reference.JDBC30Translation;\r
+\r
+/**\r
+       Extends BrokeredConnection to provide the JDBC 3.0 connection methods.\r
+ */\r
+public class BrokeredConnection30 extends BrokeredConnection\r
+{\r
+\r
+       public  BrokeredConnection30(BrokeredConnectionControl control)\r
+       {\r
+               super(control);\r
+       }\r
+\r
+       public final Statement createStatement(int resultSetType,\r
+                                 int resultSetConcurrency,\r
+                                 int resultSetHoldability)\r
+                                                                throws SQLException {\r
+               try {\r
+            resultSetHoldability = statementHoldabilityCheck(resultSetHoldability);\r
+                       return control.wrapStatement(getRealConnection().createStatement(resultSetType,\r
+                    resultSetConcurrency, resultSetHoldability));\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+       public final CallableStatement prepareCall(String sql,\r
+                                     int resultSetType,\r
+                                     int resultSetConcurrency,\r
+                                     int resultSetHoldability)\r
+                                                                        throws SQLException {\r
+               try {\r
+            resultSetHoldability = statementHoldabilityCheck(resultSetHoldability);\r
+                       return control.wrapStatement(\r
+                               getRealConnection().prepareCall(sql, resultSetType,\r
+                        resultSetConcurrency, resultSetHoldability), sql);\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+\r
+       public final Savepoint setSavepoint()\r
+               throws SQLException\r
+       {\r
+               try {\r
+                       control.checkSavepoint();\r
+                       return getRealConnection().setSavepoint();\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+\r
+       public final Savepoint setSavepoint(String name)\r
+               throws SQLException\r
+       {\r
+               try {\r
+                       control.checkSavepoint();\r
+                       return getRealConnection().setSavepoint(name);\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+\r
+       public final void rollback(Savepoint savepoint)\r
+               throws SQLException\r
+       {\r
+               try {\r
+                       control.checkRollback();\r
+                       getRealConnection().rollback(savepoint);\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+\r
+       public final void releaseSavepoint(Savepoint savepoint)\r
+               throws SQLException\r
+       {\r
+               try {\r
+                       getRealConnection().releaseSavepoint(savepoint);\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+\r
+\r
+       public final void setHoldability(int holdability)\r
+               throws SQLException\r
+       {\r
+               try {\r
+                       holdability = control.checkHoldCursors(holdability, false);\r
+                       getRealConnection().setHoldability(holdability);\r
+                       stateHoldability = holdability;\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+\r
+       public final PreparedStatement prepareStatement(\r
+                       String sql,\r
+                       int autoGeneratedKeys)\r
+    throws SQLException\r
+       {\r
+               try {\r
+                       return control.wrapStatement(getRealConnection().prepareStatement(sql, autoGeneratedKeys), sql, new Integer(autoGeneratedKeys));\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+\r
+       public final PreparedStatement prepareStatement(\r
+                       String sql,\r
+                       int[] columnIndexes)\r
+    throws SQLException\r
+       {\r
+               try {\r
+                       return control.wrapStatement(getRealConnection().prepareStatement(sql, columnIndexes), sql, columnIndexes);\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+\r
+       public final PreparedStatement prepareStatement(\r
+                       String sql,\r
+                       String[] columnNames)\r
+    throws SQLException\r
+       {\r
+               try {\r
+                       return control.wrapStatement(getRealConnection().prepareStatement(sql, columnNames), sql, columnNames);\r
+               }\r
+               catch (SQLException se)\r
+               {\r
+                       notifyException(se);\r
+                       throw se;\r
+               }\r
+       }\r
+\r
+       public BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl, String sql, Object generatedKeys) throws SQLException {\r
+               return new BrokeredPreparedStatement30(statementControl, sql, generatedKeys);\r
+       }\r
+       public BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl statementControl, String sql) throws SQLException {\r
+               return new BrokeredCallableStatement30(statementControl, sql);\r
+       }\r
+\r
+       public Array createArrayOf(String typeName, Object[] elements)\r
+                       throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public Blob createBlob() throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public Clob createClob() throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public NClob createNClob() throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public SQLXML createSQLXML() throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public Struct createStruct(String typeName, Object[] attributes)\r
+                       throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public Properties getClientInfo() throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public String getClientInfo(String name) throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public boolean isValid(int timeout) throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return false;\r
+       }\r
+\r
+       public void setClientInfo(Properties properties)\r
+                       throws SQLClientInfoException {\r
+               // TODO Auto-generated method stub\r
+               \r
+       }\r
+\r
+       public void setClientInfo(String name, String value)\r
+                       throws SQLClientInfoException {\r
+               // TODO Auto-generated method stub\r
+               \r
+       }\r
+\r
+\r
+       public boolean isWrapperFor(Class<?> iface) throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return false;\r
+       }\r
+\r
+       public <T> T unwrap(Class<T> iface) throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public void setSchema(String schema) throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               \r
+       }\r
+\r
+       public String getSchema() throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       public void abort(Executor executor) throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               \r
+       }\r
+\r
+       public void setNetworkTimeout(Executor executor, int milliseconds)\r
+                       throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               \r
+       }\r
+\r
+       public int getNetworkTimeout() throws SQLException {\r
+               // TODO Auto-generated method stub\r
+               return 0;\r
+       }\r
+\r
+}\r