--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.vti.VTIEnvironment\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.vti;\r
+\r
+/**\r
+ * \r
+ * VTIEnvironment is an interface used in costing VTIs.\r
+ * \r
+ * The interface is\r
+ * passed as a parameter to various methods in the Virtual Table interface.\r
+ *\r
+ * @see org.apache.derby.vti.VTICosting\r
+ */\r
+public interface VTIEnvironment\r
+{\r
+\r
+ /**\r
+ Return true if this instance of the VTI has been created for compilation,\r
+ false if it is for runtime execution.\r
+ */\r
+ public boolean isCompileTime();\r
+\r
+ /**\r
+ Return the SQL text of the original SQL statement.\r
+ */\r
+ public String getOriginalSQL();\r
+\r
+ /**\r
+ Get the specific JDBC isolation of the statement. If it returns Connection.TRANSACTION_NONE\r
+ then no isolation was specified and the connection's isolation level is implied.\r
+ */\r
+ public int getStatementIsolationLevel();\r
+\r
+ /**\r
+ Saves an object associated with a key that will be maintained\r
+ for the lifetime of the statement plan.\r
+ Any previous value associated with the key is discarded.\r
+ Any saved object can be seen by any JDBC Connection that has a Statement object\r
+ that references the same statement plan.\r
+ */\r
+ public void setSharedState(String key, java.io.Serializable value);\r
+\r
+ /**\r
+ Get an an object associated with a key from set of objects maintained with the statement plan.\r
+ */\r
+ public Object getSharedState(String key);\r
+}\r