EMMA Coverage Report (generated Wed Jun 28 22:15:27 PDT 2006)
[all classes][org.apache.derby.jdbc]

COVERAGE SUMMARY FOR SOURCE FILE [Driver30.java]

nameclass, %method, %block, %line, %
Driver30.java100% (1/1)100% (6/6)100% (46/46)100% (7/7)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Driver30100% (1/1)100% (6/6)100% (46/46)100% (7/7)
Driver30 (): void 100% (1/1)100% (3/3)100% (1/1)
getNewEmbedConnection (String, Properties): EmbedConnection 100% (1/1)100% (7/7)100% (1/1)
getNewNestedConnection (EmbedConnection): Connection 100% (1/1)100% (9/9)100% (2/2)
newBrokeredConnection (BrokeredConnectionControl): BrokeredConnection 100% (1/1)100% (5/5)100% (1/1)
newEmbedCallableStatement (EmbedConnection, String, int, int, int): CallableS... 100% (1/1)100% (9/9)100% (1/1)
newEmbedPreparedStatement (EmbedConnection, String, boolean, int, int, int, i... 100% (1/1)100% (13/13)100% (1/1)

1/*
2 
3   Derby - Class org.apache.derby.jdbc.Driver30
4 
5   Copyright 2001, 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 
21package org.apache.derby.jdbc;
22 
23import org.apache.derby.impl.jdbc.EmbedConnection;
24 
25import org.apache.derby.iapi.services.sanity.SanityManager;
26 
27import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
28import org.apache.derby.iapi.error.StandardException;
29import org.apache.derby.iapi.jdbc.BrokeredConnection;
30import org.apache.derby.iapi.jdbc.BrokeredConnection30;
31import org.apache.derby.iapi.jdbc.BrokeredConnectionControl;
32import java.sql.Connection;
33import java.sql.SQLException;
34import org.apache.derby.impl.jdbc.*;
35 
36import java.util.Properties;
37 
38/**
39        This class extends the local20 JDBC driver in order to determine at JBMS
40        boot-up if the JVM that runs us does support JDBC 3.0. If it is the case
41        then we will load the appropriate class(es) that have JDBC 3.0 new public
42        methods and sql types.
43 
44*/
45 
46public class Driver30 extends Driver20 {
47 
48        /**
49          * Get a new nested connection.
50         *
51         * @param conn        The EmbedConnection.
52         *
53         * @return A nested connection object.
54         *
55         */
56        public Connection getNewNestedConnection(EmbedConnection conn)
57        {
58                if (SanityManager.DEBUG)
59                {
60                        SanityManager.ASSERT(conn instanceof EmbedConnection30,
61                                "conn expected to be instanceof EmbedConnection30");
62                }
63                return new EmbedConnection30(conn);
64        }
65 
66        /*
67                Methods to be overloaded in sub-implementations such as
68                a tracing driver.
69  */
70        public EmbedConnection getNewEmbedConnection(String url, Properties info)
71                 throws SQLException 
72        {
73                return new EmbedConnection30(this, url, info);
74        }
75 
76        /**
77                 @exception SQLException if fails to create statement
78         */
79        public java.sql.PreparedStatement
80        newEmbedPreparedStatement (
81                        EmbedConnection conn,
82                        String stmt,
83                        boolean forMetaData,
84                        int resultSetType,
85                        int resultSetConcurrency,
86                        int resultSetHoldability,
87                        int autoGeneratedKeys,
88                        int[] columnIndexes,
89                        String[] columnNames)
90    throws SQLException
91        {
92                return new EmbedPreparedStatement30(conn,
93                                                                stmt,
94                                                                forMetaData,
95                                                                resultSetType,
96                                                                resultSetConcurrency,
97                                                                resultSetHoldability,
98                                                                autoGeneratedKeys,
99                                                                columnIndexes,
100                                                                columnNames);
101        }
102 
103        /**
104                 @exception SQLException if fails to create statement
105         */
106        public java.sql.CallableStatement
107        newEmbedCallableStatement(
108                        EmbedConnection conn,
109                        String stmt,
110                        int resultSetType,
111                        int resultSetConcurrency,
112                        int resultSetHoldability)
113    throws SQLException
114        {
115                return new EmbedCallableStatement30(conn,
116                                                                stmt,
117                                                                resultSetType,
118                                                                resultSetConcurrency,
119                                                                resultSetHoldability);
120        }
121        public BrokeredConnection newBrokeredConnection(BrokeredConnectionControl control) {
122 
123                return new BrokeredConnection30(control);
124        }
125}

[all classes][org.apache.derby.jdbc]
EMMA 2.0.5312 (C) Vladimir Roubtsov