001: /*
002: * Distributed as part of c3p0 v.0.9.1.2
003: *
004: * Copyright (C) 2005 Machinery For Change, Inc.
005: *
006: * Author: Steve Waldman <swaldman@mchange.com>
007: *
008: * This library is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU Lesser General Public License version 2.1, as
010: * published by the Free Software Foundation.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public License
018: * along with this software; see the file LICENSE. If not, write to the
019: * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
020: * Boston, MA 02111-1307, USA.
021: */
022:
023: package com.mchange.v2.sql.filter;
024:
025: import java.lang.String;
026: import java.sql.CallableStatement;
027: import java.sql.Connection;
028: import java.sql.DatabaseMetaData;
029: import java.sql.PreparedStatement;
030: import java.sql.SQLException;
031: import java.sql.SQLWarning;
032: import java.sql.Savepoint;
033: import java.sql.Statement;
034: import java.util.Map;
035:
036: public abstract class SynchronizedFilterConnection implements
037: Connection {
038: protected Connection inner;
039:
040: public SynchronizedFilterConnection(Connection inner) {
041: this .inner = inner;
042: }
043:
044: public SynchronizedFilterConnection() {
045: }
046:
047: public synchronized void setInner(Connection inner) {
048: this .inner = inner;
049: }
050:
051: public synchronized Connection getInner() {
052: return inner;
053: }
054:
055: public synchronized Statement createStatement(int a, int b, int c)
056: throws SQLException {
057: return inner.createStatement(a, b, c);
058: }
059:
060: public synchronized Statement createStatement(int a, int b)
061: throws SQLException {
062: return inner.createStatement(a, b);
063: }
064:
065: public synchronized Statement createStatement() throws SQLException {
066: return inner.createStatement();
067: }
068:
069: public synchronized PreparedStatement prepareStatement(String a,
070: String[] b) throws SQLException {
071: return inner.prepareStatement(a, b);
072: }
073:
074: public synchronized PreparedStatement prepareStatement(String a)
075: throws SQLException {
076: return inner.prepareStatement(a);
077: }
078:
079: public synchronized PreparedStatement prepareStatement(String a,
080: int b, int c) throws SQLException {
081: return inner.prepareStatement(a, b, c);
082: }
083:
084: public synchronized PreparedStatement prepareStatement(String a,
085: int b, int c, int d) throws SQLException {
086: return inner.prepareStatement(a, b, c, d);
087: }
088:
089: public synchronized PreparedStatement prepareStatement(String a,
090: int b) throws SQLException {
091: return inner.prepareStatement(a, b);
092: }
093:
094: public synchronized PreparedStatement prepareStatement(String a,
095: int[] b) throws SQLException {
096: return inner.prepareStatement(a, b);
097: }
098:
099: public synchronized CallableStatement prepareCall(String a, int b,
100: int c, int d) throws SQLException {
101: return inner.prepareCall(a, b, c, d);
102: }
103:
104: public synchronized CallableStatement prepareCall(String a, int b,
105: int c) throws SQLException {
106: return inner.prepareCall(a, b, c);
107: }
108:
109: public synchronized CallableStatement prepareCall(String a)
110: throws SQLException {
111: return inner.prepareCall(a);
112: }
113:
114: public synchronized String nativeSQL(String a) throws SQLException {
115: return inner.nativeSQL(a);
116: }
117:
118: public synchronized void setAutoCommit(boolean a)
119: throws SQLException {
120: inner.setAutoCommit(a);
121: }
122:
123: public synchronized boolean getAutoCommit() throws SQLException {
124: return inner.getAutoCommit();
125: }
126:
127: public synchronized void commit() throws SQLException {
128: inner.commit();
129: }
130:
131: public synchronized void rollback(Savepoint a) throws SQLException {
132: inner.rollback(a);
133: }
134:
135: public synchronized void rollback() throws SQLException {
136: inner.rollback();
137: }
138:
139: public synchronized DatabaseMetaData getMetaData()
140: throws SQLException {
141: return inner.getMetaData();
142: }
143:
144: public synchronized void setCatalog(String a) throws SQLException {
145: inner.setCatalog(a);
146: }
147:
148: public synchronized String getCatalog() throws SQLException {
149: return inner.getCatalog();
150: }
151:
152: public synchronized void setTransactionIsolation(int a)
153: throws SQLException {
154: inner.setTransactionIsolation(a);
155: }
156:
157: public synchronized int getTransactionIsolation()
158: throws SQLException {
159: return inner.getTransactionIsolation();
160: }
161:
162: public synchronized SQLWarning getWarnings() throws SQLException {
163: return inner.getWarnings();
164: }
165:
166: public synchronized void clearWarnings() throws SQLException {
167: inner.clearWarnings();
168: }
169:
170: public synchronized Map getTypeMap() throws SQLException {
171: return inner.getTypeMap();
172: }
173:
174: public synchronized void setTypeMap(Map a) throws SQLException {
175: inner.setTypeMap(a);
176: }
177:
178: public synchronized void setHoldability(int a) throws SQLException {
179: inner.setHoldability(a);
180: }
181:
182: public synchronized int getHoldability() throws SQLException {
183: return inner.getHoldability();
184: }
185:
186: public synchronized Savepoint setSavepoint() throws SQLException {
187: return inner.setSavepoint();
188: }
189:
190: public synchronized Savepoint setSavepoint(String a)
191: throws SQLException {
192: return inner.setSavepoint(a);
193: }
194:
195: public synchronized void releaseSavepoint(Savepoint a)
196: throws SQLException {
197: inner.releaseSavepoint(a);
198: }
199:
200: public synchronized void setReadOnly(boolean a) throws SQLException {
201: inner.setReadOnly(a);
202: }
203:
204: public synchronized boolean isReadOnly() throws SQLException {
205: return inner.isReadOnly();
206: }
207:
208: public synchronized void close() throws SQLException {
209: inner.close();
210: }
211:
212: public synchronized boolean isClosed() throws SQLException {
213: return inner.isClosed();
214: }
215: }
|