Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / MyDerby-10.3 / java / engine / org / apache / derby / iapi / sql / execute / ExecPreparedStatement.java
diff --git a/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/sql/execute/ExecPreparedStatement.java b/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/sql/execute/ExecPreparedStatement.java
new file mode 100644 (file)
index 0000000..8989bb1
--- /dev/null
@@ -0,0 +1,162 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.sql.execute.ExecPreparedStatement\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.sql.execute;\r
+\r
+import org.apache.derby.iapi.services.loader.GeneratedClass;\r
+\r
+import org.apache.derby.iapi.error.StandardException;\r
+\r
+import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;\r
+\r
+import org.apache.derby.iapi.sql.PreparedStatement;\r
+import org.apache.derby.iapi.sql.ResultColumnDescriptor;\r
+\r
+import java.util.List;\r
+\r
+/**\r
+ * Execution extends prepared statement to add methods it needs\r
+ * for execution purposes (that should not be on the Database API).\r
+ *\r
+ */\r
+public interface ExecPreparedStatement \r
+       extends PreparedStatement {\r
+\r
+       /**\r
+        * set the statement text\r
+        *\r
+        * @param txt the source text\r
+        */\r
+       void setSource(String txt);\r
+\r
+       /**\r
+        *      Get the Execution constants. This routine is called at Execution time.\r
+        *\r
+        *      @return ConstantAction  The big structure enclosing the Execution constants.\r
+        */\r
+       ConstantAction  getConstantAction( );\r
+\r
+       /**\r
+        *      Get a saved object by number.  This is called during execution to\r
+        *  access objects created at compile time.  These are meant to be\r
+        *  read-only at run time.\r
+        *\r
+        *      @return Object  A saved object.  The caller has to know what\r
+        *      it is requesting and cast it back to the expected type.\r
+        */\r
+       Object  getSavedObject(int objectNum);\r
+\r
+       /**\r
+        *      Get all the saved objects.  Used for stored prepared\r
+        *      statements.\r
+        *\r
+        *      @return Object[]        the saved objects\r
+        */\r
+       Object[]        getSavedObjects();\r
+\r
+       /**\r
+        *      Get the saved cursor info.  Used for stored prepared\r
+        *      statements.\r
+        *\r
+        *      @return Object  the cursor info\r
+        */\r
+       Object  getCursorInfo();\r
+\r
+       /**\r
+        *  Get the class generated for this prepared statement.\r
+        *  Used to confirm compatability with auxilary structures.\r
+        *\r
+        * @exception StandardException on error obtaining class\r
+        *      (probably when a stored prepared statement is loading)\r
+        */\r
+       GeneratedClass getActivationClass() throws StandardException;\r
+\r
+       /**\r
+        *  Mark the statement as unusable, i.e. the system is\r
+        * finished with it and no one should be able to use it.\r
+        */\r
+       void finish(LanguageConnectionContext lcc);\r
+\r
+       /**\r
+        * Does this statement need a savpoint\r
+        *\r
+        * @return true if needs a savepoint\r
+        */\r
+       boolean needsSavepoint();\r
+\r
+       /**\r
+        * Get a new prepared statement that is a shallow copy\r
+        * of the current one.\r
+        *\r
+        * @return a new prepared statement\r
+        *\r
+        * @exception StandardException on error \r
+        */\r
+       public ExecPreparedStatement getClone() throws StandardException;\r
+\r
+       /* Methods from old CursorPreparedStatement */\r
+\r
+       /**\r
+        * the update mode of the cursor\r
+        *\r
+        * @return      The update mode of the cursor\r
+        */\r
+       int     getUpdateMode();\r
+\r
+       /**\r
+        * the target table of the cursor\r
+        *\r
+        * @return      target table of the cursor\r
+        */\r
+       ExecCursorTableReference getTargetTable();\r
+\r
+       /**\r
+        * the target columns of the cursor; this is a superset of\r
+        * the updatable columns, describing the row available\r
+        *\r
+        * @return      target columns of the cursor as an array of column descriptors\r
+        */\r
+       ResultColumnDescriptor[]        getTargetColumns();\r
+\r
+       /**\r
+        * the update columns of the cursor\r
+        *\r
+        * @return      update columns of the cursor as a string of column names\r
+        */\r
+       String[]        getUpdateColumns();\r
+\r
+       /**\r
+        * set this parepared statement to be valid\r
+        */\r
+       void setValid();\r
+\r
+       /**\r
+        * Indicate that the statement represents an SPS action\r
+        */\r
+       void setSPSAction();\r
+\r
+       /**\r
+        * @return the list of permissions required to execute this statement. May be null if\r
+        *         the database does not use SQL standard authorization\r
+        */\r
+       List getRequiredPermissionsList();\r
+}\r
+\r