KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mchange > v2 > c3p0 > impl > SetManagedDatabaseMetaData


1 /*
2  * Distributed as part of c3p0 v.0.9.1
3  *
4  * Copyright (C) 2005 Machinery For Change, Inc.
5  *
6  * Author: Steve Waldman <swaldman@mchange.com>
7  *
8  * This library is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License version 2.1, as
10  * published by the Free Software Foundation.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this software; see the file LICENSE. If not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */

22
23
24 package com.mchange.v2.c3p0.impl;
25
26 import java.sql.*;
27 import java.util.Set JavaDoc;
28 import com.mchange.v2.sql.filter.FilterDatabaseMetaData;
29
30 final class SetManagedDatabaseMetaData extends FilterDatabaseMetaData
31 {
32     Set JavaDoc activeResultSets;
33     Connection returnableProxy;
34
35     SetManagedDatabaseMetaData( DatabaseMetaData inner, Set JavaDoc activeResultSets, Connection returnableProxy )
36     {
37         super( inner );
38         this.activeResultSets = activeResultSets;
39         this.returnableProxy = returnableProxy;
40     }
41
42     public Connection getConnection() throws SQLException
43     { return returnableProxy; }
44
45     public ResultSet getProcedures(String JavaDoc a, String JavaDoc b, String JavaDoc c) throws SQLException
46     {
47         return new NullStatementSetManagedResultSet( inner.getProcedures(a, b, c), activeResultSets );
48     }
49
50     public ResultSet getProcedureColumns(String JavaDoc a, String JavaDoc b, String JavaDoc c, String JavaDoc d) throws SQLException
51     {
52         return new NullStatementSetManagedResultSet( inner.getProcedureColumns(a, b, c, d), activeResultSets );
53     }
54
55     public ResultSet getTables(String JavaDoc a, String JavaDoc b, String JavaDoc c, String JavaDoc[] d) throws SQLException
56     {
57         return new NullStatementSetManagedResultSet( inner.getTables(a, b, c, d), activeResultSets );
58     }
59
60     public ResultSet getSchemas() throws SQLException
61     {
62         return new NullStatementSetManagedResultSet( inner.getSchemas(), activeResultSets );
63     }
64
65     public ResultSet getCatalogs() throws SQLException
66     {
67         return new NullStatementSetManagedResultSet( inner.getCatalogs(), activeResultSets );
68     }
69
70     public ResultSet getTableTypes() throws SQLException
71     {
72         return new NullStatementSetManagedResultSet( inner.getTableTypes(), activeResultSets );
73     }
74
75     public ResultSet getColumns(String JavaDoc a, String JavaDoc b, String JavaDoc c, String JavaDoc d) throws SQLException
76     {
77         return new NullStatementSetManagedResultSet( inner.getColumns(a, b, c, d), activeResultSets );
78     }
79
80     public ResultSet getColumnPrivileges(String JavaDoc a, String JavaDoc b, String JavaDoc c, String JavaDoc d) throws SQLException
81     {
82         return new NullStatementSetManagedResultSet( inner.getColumnPrivileges(a, b, c, d), activeResultSets );
83     }
84
85     public ResultSet getTablePrivileges(String JavaDoc a, String JavaDoc b, String JavaDoc c) throws SQLException
86     {
87         return new NullStatementSetManagedResultSet( inner.getTablePrivileges(a, b, c), activeResultSets );
88     }
89
90     public ResultSet getBestRowIdentifier(String JavaDoc a, String JavaDoc b, String JavaDoc c, int d, boolean e) throws SQLException
91     {
92         return new NullStatementSetManagedResultSet( inner.getBestRowIdentifier(a, b, c, d, e), activeResultSets );
93     }
94
95     public ResultSet getVersionColumns(String JavaDoc a, String JavaDoc b, String JavaDoc c) throws SQLException
96     {
97         return new NullStatementSetManagedResultSet( inner.getVersionColumns(a, b, c), activeResultSets );
98     }
99
100     public ResultSet getPrimaryKeys(String JavaDoc a, String JavaDoc b, String JavaDoc c) throws SQLException
101     {
102         return new NullStatementSetManagedResultSet( inner.getPrimaryKeys(a, b, c), activeResultSets );
103     }
104
105     public ResultSet getImportedKeys(String JavaDoc a, String JavaDoc b, String JavaDoc c) throws SQLException
106     {
107         return new NullStatementSetManagedResultSet( inner.getImportedKeys(a, b, c), activeResultSets );
108     }
109
110     public ResultSet getExportedKeys(String JavaDoc a, String JavaDoc b, String JavaDoc c) throws SQLException
111     {
112         return new NullStatementSetManagedResultSet( inner.getExportedKeys(a, b, c), activeResultSets );
113     }
114
115     public ResultSet getCrossReference(String JavaDoc a, String JavaDoc b, String JavaDoc c, String JavaDoc d, String JavaDoc e, String JavaDoc f) throws SQLException
116     {
117         return new NullStatementSetManagedResultSet( inner.getCrossReference(a, b, c, d, e, f), activeResultSets );
118     }
119
120     public ResultSet getTypeInfo() throws SQLException
121     {
122         return new NullStatementSetManagedResultSet( inner.getTypeInfo(), activeResultSets );
123     }
124
125     public ResultSet getIndexInfo(String JavaDoc a, String JavaDoc b, String JavaDoc c, boolean d, boolean e) throws SQLException
126     {
127         return new NullStatementSetManagedResultSet( inner.getIndexInfo(a, b, c, d, e), activeResultSets );
128     }
129
130     public ResultSet getUDTs(String JavaDoc a, String JavaDoc b, String JavaDoc c, int[] d) throws SQLException
131     {
132         return new NullStatementSetManagedResultSet( inner.getUDTs(a, b, c, d), activeResultSets );
133     }
134 }
135
136
137
Popular Tags