KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > vti > VTIEnvironment


1 /*
2
3    Derby - Class org.apache.derby.vti.VTIEnvironment
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.vti;
23
24 /**
25   *
26   * VTIEnvironment is an interface used in costing VTIs.
27   *
28   * The interface is
29   * passed as a parameter to various methods in the Virtual Table interface.
30   *
31   * @see org.apache.derby.vti.VTICosting
32   */

33 public interface VTIEnvironment
34 {
35
36     /**
37         Return true if this instance of the VTI has been created for compilation,
38         false if it is for runtime execution.
39     */

40     public boolean isCompileTime();
41
42     /**
43         Return the SQL text of the original SQL statement.
44     */

45     public String JavaDoc getOriginalSQL();
46
47     /**
48         Get the specific JDBC isolation of the statement. If it returns Connection.TRANSACTION_NONE
49         then no isolation was specified and the connection's isolation level is implied.
50     */

51     public int getStatementIsolationLevel();
52
53     /**
54         Saves an object associated with a key that will be maintained
55         for the lifetime of the statement plan.
56         Any previous value associated with the key is discarded.
57         Any saved object can be seen by any JDBC Connection that has a Statement object
58         that references the same statement plan.
59     */

60     public void setSharedState(String JavaDoc key, java.io.Serializable JavaDoc value);
61
62     /**
63         Get an an object associated with a key from set of objects maintained with the statement plan.
64     */

65     public Object JavaDoc getSharedState(String JavaDoc key);
66 }
67
Popular Tags