|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ConnectionWrapper.java | - | 0% | 0% | 0% |
|
1 |
/*
|
|
2 |
* Joey and its relative products are published under the terms
|
|
3 |
* of the Apache Software License.
|
|
4 |
*/
|
|
5 |
package org.asyrinx.brownie.jdbc.wrapper;
|
|
6 |
|
|
7 |
import java.sql.CallableStatement;
|
|
8 |
import java.sql.Connection;
|
|
9 |
import java.sql.DatabaseMetaData;
|
|
10 |
import java.sql.PreparedStatement;
|
|
11 |
import java.sql.SQLException;
|
|
12 |
import java.sql.SQLWarning;
|
|
13 |
import java.sql.Savepoint;
|
|
14 |
import java.sql.Statement;
|
|
15 |
import java.util.Map;
|
|
16 |
|
|
17 |
import org.asyrinx.brownie.core.util.Wrapper;
|
|
18 |
|
|
19 |
/**
|
|
20 |
* @author Akima
|
|
21 |
*/
|
|
22 |
public class ConnectionWrapper extends Wrapper implements Connection { |
|
23 |
|
|
24 |
/**
|
|
25 |
* Constructor for ConnectionWrapper.
|
|
26 |
*/
|
|
27 | 0 |
public ConnectionWrapper(Connection source) {
|
28 | 0 |
super(source);
|
29 | 0 |
this.source = source;
|
30 |
} |
|
31 |
|
|
32 |
protected final Connection source;
|
|
33 |
|
|
34 |
/**
|
|
35 |
* Returns the source.
|
|
36 |
*
|
|
37 |
* @return Connection
|
|
38 |
*/
|
|
39 | 0 |
public Connection getSource() {
|
40 | 0 |
return source;
|
41 |
} |
|
42 |
|
|
43 |
/**
|
|
44 |
* @throws java.sql.SQLException
|
|
45 |
*/
|
|
46 | 0 |
public void clearWarnings() throws SQLException { |
47 | 0 |
source.clearWarnings(); |
48 |
} |
|
49 |
|
|
50 |
/**
|
|
51 |
* @throws java.sql.SQLException
|
|
52 |
*/
|
|
53 | 0 |
public void close() throws SQLException { |
54 | 0 |
source.close(); |
55 |
} |
|
56 |
|
|
57 |
/**
|
|
58 |
* @throws java.sql.SQLException
|
|
59 |
*/
|
|
60 | 0 |
public void commit() throws SQLException { |
61 | 0 |
source.commit(); |
62 |
} |
|
63 |
|
|
64 |
/**
|
|
65 |
* @return @throws
|
|
66 |
* java.sql.SQLException
|
|
67 |
*/
|
|
68 | 0 |
public Statement createStatement() throws SQLException { |
69 | 0 |
return source.createStatement();
|
70 |
} |
|
71 |
|
|
72 |
/**
|
|
73 |
* @param resultSetType
|
|
74 |
* @param resultSetConcurrency
|
|
75 |
* @return @throws
|
|
76 |
* java.sql.SQLException
|
|
77 |
*/
|
|
78 | 0 |
public Statement createStatement(int resultSetType, int resultSetConcurrency) |
79 |
throws SQLException {
|
|
80 | 0 |
return source.createStatement(resultSetType, resultSetConcurrency);
|
81 |
} |
|
82 |
|
|
83 |
/**
|
|
84 |
* @param resultSetType
|
|
85 |
* @param resultSetConcurrency
|
|
86 |
* @param resultSetHoldability
|
|
87 |
* @return @throws
|
|
88 |
* java.sql.SQLException
|
|
89 |
*/
|
|
90 | 0 |
public Statement createStatement(int resultSetType, |
91 |
int resultSetConcurrency, int resultSetHoldability) |
|
92 |
throws SQLException {
|
|
93 | 0 |
return source.createStatement(resultSetType, resultSetConcurrency,
|
94 |
resultSetHoldability); |
|
95 |
} |
|
96 |
|
|
97 |
/**
|
|
98 |
* @return @throws
|
|
99 |
* java.sql.SQLException
|
|
100 |
*/
|
|
101 | 0 |
public boolean getAutoCommit() throws SQLException { |
102 | 0 |
return source.getAutoCommit();
|
103 |
} |
|
104 |
|
|
105 |
/**
|
|
106 |
* @return @throws
|
|
107 |
* java.sql.SQLException
|
|
108 |
*/
|
|
109 | 0 |
public String getCatalog() throws SQLException { |
110 | 0 |
return source.getCatalog();
|
111 |
} |
|
112 |
|
|
113 |
/**
|
|
114 |
* @return @throws
|
|
115 |
* java.sql.SQLException
|
|
116 |
*/
|
|
117 | 0 |
public int getHoldability() throws SQLException { |
118 | 0 |
return source.getHoldability();
|
119 |
} |
|
120 |
|
|
121 |
/**
|
|
122 |
* @return @throws
|
|
123 |
* java.sql.SQLException
|
|
124 |
*/
|
|
125 | 0 |
public DatabaseMetaData getMetaData() throws SQLException { |
126 | 0 |
return source.getMetaData();
|
127 |
} |
|
128 |
|
|
129 |
/**
|
|
130 |
* @return @throws
|
|
131 |
* java.sql.SQLException
|
|
132 |
*/
|
|
133 | 0 |
public int getTransactionIsolation() throws SQLException { |
134 | 0 |
return source.getTransactionIsolation();
|
135 |
} |
|
136 |
|
|
137 |
/**
|
|
138 |
* @return @throws
|
|
139 |
* java.sql.SQLException
|
|
140 |
*/
|
|
141 | 0 |
public Map getTypeMap() throws SQLException { |
142 | 0 |
return source.getTypeMap();
|
143 |
} |
|
144 |
|
|
145 |
/**
|
|
146 |
* @return @throws
|
|
147 |
* java.sql.SQLException
|
|
148 |
*/
|
|
149 | 0 |
public SQLWarning getWarnings() throws SQLException { |
150 | 0 |
return source.getWarnings();
|
151 |
} |
|
152 |
|
|
153 |
/**
|
|
154 |
* @return @throws
|
|
155 |
* java.sql.SQLException
|
|
156 |
*/
|
|
157 | 0 |
public boolean isClosed() throws SQLException { |
158 | 0 |
return source.isClosed();
|
159 |
} |
|
160 |
|
|
161 |
/**
|
|
162 |
* @return @throws
|
|
163 |
* java.sql.SQLException
|
|
164 |
*/
|
|
165 | 0 |
public boolean isReadOnly() throws SQLException { |
166 | 0 |
return source.isReadOnly();
|
167 |
} |
|
168 |
|
|
169 |
/**
|
|
170 |
* @param sql
|
|
171 |
* @return @throws
|
|
172 |
* java.sql.SQLException
|
|
173 |
*/
|
|
174 | 0 |
public String nativeSQL(String sql) throws SQLException { |
175 | 0 |
return source.nativeSQL(sql);
|
176 |
} |
|
177 |
|
|
178 |
/**
|
|
179 |
* @param sql
|
|
180 |
* @return @throws
|
|
181 |
* java.sql.SQLException
|
|
182 |
*/
|
|
183 | 0 |
public CallableStatement prepareCall(String sql) throws SQLException { |
184 | 0 |
return source.prepareCall(sql);
|
185 |
} |
|
186 |
|
|
187 |
/**
|
|
188 |
* @param sql
|
|
189 |
* @param resultSetType
|
|
190 |
* @param resultSetConcurrency
|
|
191 |
* @return @throws
|
|
192 |
* java.sql.SQLException
|
|
193 |
*/
|
|
194 | 0 |
public CallableStatement prepareCall(String sql, int resultSetType, |
195 |
int resultSetConcurrency) throws SQLException { |
|
196 | 0 |
return source.prepareCall(sql, resultSetType, resultSetConcurrency);
|
197 |
} |
|
198 |
|
|
199 |
/**
|
|
200 |
* @param sql
|
|
201 |
* @param resultSetType
|
|
202 |
* @param resultSetConcurrency
|
|
203 |
* @param resultSetHoldability
|
|
204 |
* @return @throws
|
|
205 |
* java.sql.SQLException
|
|
206 |
*/
|
|
207 | 0 |
public CallableStatement prepareCall(String sql, int resultSetType, |
208 |
int resultSetConcurrency, int resultSetHoldability) |
|
209 |
throws SQLException {
|
|
210 | 0 |
return source.prepareCall(sql, resultSetType, resultSetConcurrency,
|
211 |
resultSetHoldability); |
|
212 |
} |
|
213 |
|
|
214 |
/**
|
|
215 |
* @param sql
|
|
216 |
* @return @throws
|
|
217 |
* java.sql.SQLException
|
|
218 |
*/
|
|
219 | 0 |
public PreparedStatement prepareStatement(String sql) throws SQLException { |
220 | 0 |
return source.prepareStatement(sql);
|
221 |
} |
|
222 |
|
|
223 |
/**
|
|
224 |
* @param sql
|
|
225 |
* @param autoGeneratedKeys
|
|
226 |
* @return @throws
|
|
227 |
* java.sql.SQLException
|
|
228 |
*/
|
|
229 | 0 |
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) |
230 |
throws SQLException {
|
|
231 | 0 |
return source.prepareStatement(sql, autoGeneratedKeys);
|
232 |
} |
|
233 |
|
|
234 |
/**
|
|
235 |
* @param sql
|
|
236 |
* @param resultSetType
|
|
237 |
* @param resultSetConcurrency
|
|
238 |
* @return @throws
|
|
239 |
* java.sql.SQLException
|
|
240 |
*/
|
|
241 | 0 |
public PreparedStatement prepareStatement(String sql, int resultSetType, |
242 |
int resultSetConcurrency) throws SQLException { |
|
243 | 0 |
return source
|
244 |
.prepareStatement(sql, resultSetType, resultSetConcurrency); |
|
245 |
} |
|
246 |
|
|
247 |
/**
|
|
248 |
* @param sql
|
|
249 |
* @param resultSetType
|
|
250 |
* @param resultSetConcurrency
|
|
251 |
* @param resultSetHoldability
|
|
252 |
* @return @throws
|
|
253 |
* java.sql.SQLException
|
|
254 |
*/
|
|
255 | 0 |
public PreparedStatement prepareStatement(String sql, int resultSetType, |
256 |
int resultSetConcurrency, int resultSetHoldability) |
|
257 |
throws SQLException {
|
|
258 | 0 |
return source.prepareStatement(sql, resultSetType,
|
259 |
resultSetConcurrency, resultSetHoldability); |
|
260 |
} |
|
261 |
|
|
262 |
/**
|
|
263 |
* @param sql
|
|
264 |
* @param columnIndexes
|
|
265 |
* @return @throws
|
|
266 |
* java.sql.SQLException
|
|
267 |
*/
|
|
268 | 0 |
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) |
269 |
throws SQLException {
|
|
270 | 0 |
return source.prepareStatement(sql, columnIndexes);
|
271 |
} |
|
272 |
|
|
273 |
/**
|
|
274 |
* @param sql
|
|
275 |
* @param columnNames
|
|
276 |
* @return @throws
|
|
277 |
* java.sql.SQLException
|
|
278 |
*/
|
|
279 | 0 |
public PreparedStatement prepareStatement(String sql, String[] columnNames)
|
280 |
throws SQLException {
|
|
281 | 0 |
return source.prepareStatement(sql, columnNames);
|
282 |
} |
|
283 |
|
|
284 |
/**
|
|
285 |
* @param savepoint
|
|
286 |
* @throws java.sql.SQLException
|
|
287 |
*/
|
|
288 | 0 |
public void releaseSavepoint(Savepoint savepoint) throws SQLException { |
289 | 0 |
source.releaseSavepoint(savepoint); |
290 |
} |
|
291 |
|
|
292 |
/**
|
|
293 |
* @throws java.sql.SQLException
|
|
294 |
*/
|
|
295 | 0 |
public void rollback() throws SQLException { |
296 | 0 |
source.rollback(); |
297 |
} |
|
298 |
|
|
299 |
/**
|
|
300 |
* @param savepoint
|
|
301 |
* @throws java.sql.SQLException
|
|
302 |
*/
|
|
303 | 0 |
public void rollback(Savepoint savepoint) throws SQLException { |
304 | 0 |
source.rollback(savepoint); |
305 |
} |
|
306 |
|
|
307 |
/**
|
|
308 |
* @param autoCommit
|
|
309 |
* @throws java.sql.SQLException
|
|
310 |
*/
|
|
311 | 0 |
public void setAutoCommit(boolean autoCommit) throws SQLException { |
312 | 0 |
source.setAutoCommit(autoCommit); |
313 |
} |
|
314 |
|
|
315 |
/**
|
|
316 |
* @param catalog
|
|
317 |
* @throws java.sql.SQLException
|
|
318 |
*/
|
|
319 | 0 |
public void setCatalog(String catalog) throws SQLException { |
320 | 0 |
source.setCatalog(catalog); |
321 |
} |
|
322 |
|
|
323 |
/**
|
|
324 |
* @param holdability
|
|
325 |
* @throws java.sql.SQLException
|
|
326 |
*/
|
|
327 | 0 |
public void setHoldability(int holdability) throws SQLException { |
328 | 0 |
source.setHoldability(holdability); |
329 |
} |
|
330 |
|
|
331 |
/**
|
|
332 |
* @param readOnly
|
|
333 |
* @throws java.sql.SQLException
|
|
334 |
*/
|
|
335 | 0 |
public void setReadOnly(boolean readOnly) throws SQLException { |
336 | 0 |
source.setReadOnly(readOnly); |
337 |
} |
|
338 |
|
|
339 |
/**
|
|
340 |
* @return @throws
|
|
341 |
* java.sql.SQLException
|
|
342 |
*/
|
|
343 | 0 |
public Savepoint setSavepoint() throws SQLException { |
344 | 0 |
return source.setSavepoint();
|
345 |
} |
|
346 |
|
|
347 |
/**
|
|
348 |
* @param name
|
|
349 |
* @return @throws
|
|
350 |
* java.sql.SQLException
|
|
351 |
*/
|
|
352 | 0 |
public Savepoint setSavepoint(String name) throws SQLException { |
353 | 0 |
return source.setSavepoint(name);
|
354 |
} |
|
355 |
|
|
356 |
/**
|
|
357 |
* @param level
|
|
358 |
* @throws java.sql.SQLException
|
|
359 |
*/
|
|
360 | 0 |
public void setTransactionIsolation(int level) throws SQLException { |
361 | 0 |
source.setTransactionIsolation(level); |
362 |
} |
|
363 |
|
|
364 |
/**
|
|
365 |
* @param map
|
|
366 |
* @throws java.sql.SQLException
|
|
367 |
*/
|
|
368 | 0 |
public void setTypeMap(Map map) throws SQLException { |
369 | 0 |
source.setTypeMap(map); |
370 |
} |
|
371 |
|
|
372 |
} |
|