Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/apache/derby/iapi/jdbc/ConnectionContext.java


1   /*
2   
3      Derby - Class org.apache.derby.iapi.jdbc.ConnectionContext
4   
5      Copyright 1998, 2004 The Apache Software Foundation or its licensors, as applicable.
6   
7      Licensed under the Apache License, Version 2.0 (the "License");
8      you may not use this file except in compliance with the License.
9      You may obtain a copy of the License at
10  
11        http://www.apache.org/licenses/LICENSE-2.0
12  
13     Unless required by applicable law or agreed to in writing, software
14     distributed under the License is distributed on an "AS IS" BASIS,
15     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16     See the License for the specific language governing permissions and
17     limitations under the License.
18  
19   */
20  
21  package org.apache.derby.iapi.jdbc;
22  
23  import org.apache.derby.iapi.error.StandardException;
24  import org.apache.derby.iapi.sql.ResultSet;
25  
26  import java.sql.Connection;
27  import java.sql.SQLException;
28  
29  /**
30   * Interface-ized from EmbedConnectionContext.  Some basic
31   * connection attributes that can be obtained from jdbc.
32   *
33   * @author jamie
34   */
35  public interface ConnectionContext 
36  {
37    public static final String CONTEXT_ID = "JDBC_ConnectionContext";
38  
39    /**
40      Get a new connection object equivalent to the call
41      <PRE>
42      DriverManager.getConnection("jdbc:default:connection");
43      </PRE>
44  
45      @exception SQLException Parent connection has been closed.
46    */
47    public Connection getNestedConnection(boolean internal) throws SQLException;
48  
49    /**
50     * Get a jdbc ResultSet based on the execution ResultSet.
51     *
52     * @param executionResultSet  a result set as gotten from execution
53     *  
54     * @exception java.sql.SQLException  on error
55     */  
56    public java.sql.ResultSet getResultSet
57    (
58      ResultSet         executionResultSet
59    ) throws java.sql.SQLException;
60  }