KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > dbcp > cpdsadapter > PoolablePreparedStatementStub


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.commons.dbcp.cpdsadapter;
18
19 import java.sql.PreparedStatement JavaDoc;
20 import java.sql.Connection JavaDoc;
21 import java.sql.SQLException JavaDoc;
22 import org.apache.commons.pool.KeyedObjectPool;
23 import org.apache.commons.dbcp.PoolablePreparedStatement;
24
25 /**
26  * A {@link PoolablePreparedStatement} stub since activate and passivate
27  * are declared protected and we need to be able to call them within this
28  * package.
29  *
30  * @author John D. McNally
31  * @version $Revision: 1.8 $ $Date: 2004/02/28 12:18:17 $
32  */

33 class PoolablePreparedStatementStub extends PoolablePreparedStatement {
34
35     /**
36      * Constructor
37      * @param stmt my underlying {@link PreparedStatement}
38      * @param key my key" as used by {@link KeyedObjectPool}
39      * @param pool the {@link KeyedObjectPool} from which I was obtained.
40      * @param conn the {@link Connection} from which I was created
41      */

42     public PoolablePreparedStatementStub(PreparedStatement JavaDoc stmt, Object JavaDoc key,
43             KeyedObjectPool pool, Connection JavaDoc conn) {
44         super(stmt, key, pool, conn);
45     }
46
47     protected void activate() throws SQLException JavaDoc {
48         super.activate();
49     }
50
51     protected void passivate() throws SQLException JavaDoc {
52         super.passivate();
53     }
54 }
55
Popular Tags