Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / iapi / jdbc / EngineConnection.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/jdbc/EngineConnection.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/jdbc/EngineConnection.java
new file mode 100644 (file)
index 0000000..2ca62e2
--- /dev/null
@@ -0,0 +1,106 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.jdbc.EngineConnection\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
+package org.apache.derby.iapi.jdbc;\r
+\r
+import java.sql.Connection;\r
+import java.sql.PreparedStatement;\r
+import java.sql.SQLException;\r
+import java.sql.SQLWarning;\r
+\r
+\r
+/**\r
+ * Additional methods the embedded engine exposes on its Connection object\r
+ * implementations. An internal api only, mainly for the network\r
+ * server. Allows consistent interaction between EmbedConnections\r
+ * and BrokeredConnections.\r
+ * \r
+ */\r
+public interface EngineConnection extends Connection {\r
+\r
+    /**\r
+     * Set the DRDA identifier for this connection.\r
+     */\r
+    public void setDrdaID(String drdaID);\r
+\r
+    /** \r
+     * Set the transaction isolation level that will be used for the \r
+     * next prepare.  Used by network server to implement DB2 style \r
+     * isolation levels.\r
+     * Note the passed in level using the Derby constants from\r
+     * ExecutionContext and not the JDBC constants from java.sql.Connection.\r
+     * @param level Isolation level to change to.  level is the DB2 level\r
+     *               specified in the package names which happen to correspond\r
+     *               to our internal levels. If \r
+     *               level == ExecutionContext.UNSPECIFIED_ISOLATION,\r
+     *               the statement won't be prepared with an isolation level.\r
+     * \r
+     * \r
+     */\r
+    public void setPrepareIsolation(int level) throws SQLException;\r
+\r
+    /**\r
+     * Return prepare isolation \r
+     */\r
+    public int getPrepareIsolation()\r
+        throws SQLException;\r
+\r
+    /**\r
+     * Prepare a statement with holdability.\r
+     * Identical to JDBC 3.0 method, to allow holdabilty\r
+     * to be supported in JDK 1.3 by the network server,\r
+     * e.g. when the client is jdk 1.4 or above.\r
+     * Can be removed once JDK 1.3 is no longer supported.\r
+     */\r
+    public PreparedStatement prepareStatement(String sql, int resultSetType,\r
+            int resultSetConcurrency, int resultSetHoldability)\r
+            throws SQLException;\r
+\r
+    /**\r
+     * Get the holdability of the connection. \r
+     * Identical to JDBC 3.0 method, to allow holdabilty\r
+     * to be supported in JDK 1.3 by the network server,\r
+     * e.g. when the client is jdk 1.4 or above.\r
+     * Can be removed once JDK 1.3 is no longer supported.\r
+     */\r
+    public int getHoldability() throws SQLException;\r
+    \r
+    /**\r
+     * Add a SQLWarning to this Connection object.\r
+     * @param newWarning Warning to be added, will be chained to any\r
+     * existing warnings.\r
+     */\r
+    public void addWarning(SQLWarning newWarning)\r
+        throws SQLException;\r
+\r
+    /**\r
+    * Clear the HashTable of all entries.\r
+    * Called when a commit or rollback of the transaction\r
+    * happens.\r
+    */\r
+    public void clearLOBMapping() throws SQLException;\r
+\r
+    /**\r
+    * Get the LOB reference corresponding to the locator.\r
+    * @param key the integer that represents the LOB locator value.\r
+    * @return the LOB Object corresponding to this locator.\r
+    */\r
+    public Object getLOBMapping(int key) throws SQLException;\r
+}\r