Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / MyDerby-10.3 / java / engine / org / apache / derby / iapi / jdbc / ConnectionContext.java
diff --git a/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/jdbc/ConnectionContext.java b/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/jdbc/ConnectionContext.java
new file mode 100644 (file)
index 0000000..8490b9c
--- /dev/null
@@ -0,0 +1,82 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.jdbc.ConnectionContext\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 org.apache.derby.iapi.sql.ResultSet;\r
+\r
+import java.sql.Connection;\r
+import java.sql.SQLException;\r
+\r
+/**\r
+ * Interface-ized from EmbedConnectionContext.  Some basic\r
+ * connection attributes that can be obtained from jdbc.\r
+ *\r
+ */\r
+public interface ConnectionContext \r
+{\r
+       public static final String CONTEXT_ID = "JDBC_ConnectionContext";\r
+\r
+       /**\r
+               Get a new connection object equivalent to the call\r
+               <PRE>\r
+               DriverManager.getConnection("jdbc:default:connection");\r
+               </PRE>\r
+\r
+               @exception SQLException Parent connection has been closed.\r
+       */\r
+       public Connection getNestedConnection(boolean internal) throws SQLException;\r
+\r
+       /**\r
+        * Get a jdbc ResultSet based on the execution ResultSet.\r
+        *\r
+        * @param executionResultSet    a result set as gotten from execution\r
+        *      \r
+        * @exception java.sql.SQLException     on error\r
+        */     \r
+       public java.sql.ResultSet getResultSet\r
+       (\r
+               ResultSet                               executionResultSet\r
+       ) throws java.sql.SQLException;\r
+    \r
+    /**\r
+     * Process the resultSet as a dynamic result for closure.\r
+     * The result set will have been created in a Java procedure.\r
+     * If the ResultSet is a valid dynamic ResultSet for\r
+     * this connection, then it is set up as a dynamic result\r
+     * which includes:\r
+     * <UL>\r
+     * <LI> breaking its link with the JDBC connection\r
+     * that created it, since there is a good chance that connection\r
+     * was closed explicitly by the Java procedure.\r
+     * <LI> marking its activation as single use to ensure the\r
+     * close of the ResultSet will close the activation.\r
+     * </UL>\r
+     * <P>\r
+     * If the result set a valid dynamic result then false will\r
+     * be returned and no action made against it.\r
+     * \r
+     * @param resultSet ResultSet to process.\r
+     * @return True if this ResultSet was created by this connection\r
+     * and the result set is open. False otherwise.\r
+     */\r
+    public boolean processInaccessibleDynamicResult(java.sql.ResultSet resultSet);\r
+}\r