1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.oqt.driver;
17
18 import java.io.InputStream;
19 import java.io.Reader;
20 import java.math.BigDecimal;
21 import java.net.URL;
22 import java.sql.Array;
23 import java.sql.Blob;
24 import java.sql.Clob;
25 import java.sql.Connection;
26 import java.sql.Date;
27 import java.sql.NClob;
28 import java.sql.ParameterMetaData;
29 import java.sql.PreparedStatement;
30 import java.sql.Ref;
31 import java.sql.ResultSet;
32 import java.sql.ResultSetMetaData;
33 import java.sql.RowId;
34 import java.sql.SQLException;
35 import java.sql.SQLWarning;
36 import java.sql.SQLXML;
37 import java.sql.Time;
38 import java.sql.Timestamp;
39 import java.util.Calendar;
40
41 import net.sf.oqt.core.CoreFactory;
42
43 class NullPreparedStatement implements PreparedStatement {
44
45 NullPreparedStatement(final String sql) {
46 CoreFactory.getQueries().add(sql);
47 }
48
49 @Override
50 public void addBatch(final String sql) throws SQLException {
51
52
53 }
54
55 @Override
56 public void cancel() throws SQLException {
57
58
59 }
60
61 @Override
62 public void clearBatch() throws SQLException {
63
64
65 }
66
67 @Override
68 public void clearWarnings() throws SQLException {
69
70
71 }
72
73 @Override
74 public void close() throws SQLException {
75
76
77 }
78
79 @Override
80 public void closeOnCompletion() throws SQLException {
81
82
83 }
84
85 @Override
86 public boolean execute(final String sql) throws SQLException {
87
88 return false;
89 }
90
91 @Override
92 public boolean execute(final String sql, final int autoGeneratedKeys) throws SQLException {
93
94 return false;
95 }
96
97 @Override
98 public boolean execute(final String sql, final int[] columnIndexes) throws SQLException {
99
100 return false;
101 }
102
103 @Override
104 public boolean execute(final String sql, final String[] columnNames) throws SQLException {
105
106 return false;
107 }
108
109 @Override
110 public int[] executeBatch() throws SQLException {
111
112 return null;
113 }
114
115 @Override
116 public ResultSet executeQuery(final String sql) throws SQLException {
117 return new NullResultSet();
118 }
119
120 @Override
121 public int executeUpdate(final String sql) throws SQLException {
122
123 return 0;
124 }
125
126 @Override
127 public int executeUpdate(final String sql, final int autoGeneratedKeys) throws SQLException {
128
129 return 0;
130 }
131
132 @Override
133 public int executeUpdate(final String sql, final int[] columnIndexes) throws SQLException {
134
135 return 0;
136 }
137
138 @Override
139 public int executeUpdate(final String sql, final String[] columnNames) throws SQLException {
140
141 return 0;
142 }
143
144 @Override
145 public Connection getConnection() throws SQLException {
146
147 return null;
148 }
149
150 @Override
151 public int getFetchDirection() throws SQLException {
152
153 return 0;
154 }
155
156 @Override
157 public int getFetchSize() throws SQLException {
158
159 return 0;
160 }
161
162 @Override
163 public ResultSet getGeneratedKeys() throws SQLException {
164
165 return null;
166 }
167
168 @Override
169 public int getMaxFieldSize() throws SQLException {
170
171 return 0;
172 }
173
174 @Override
175 public int getMaxRows() throws SQLException {
176
177 return 0;
178 }
179
180 @Override
181 public boolean getMoreResults() throws SQLException {
182
183 return false;
184 }
185
186 @Override
187 public boolean getMoreResults(final int current) throws SQLException {
188
189 return false;
190 }
191
192 @Override
193 public int getQueryTimeout() throws SQLException {
194
195 return 0;
196 }
197
198 @Override
199 public ResultSet getResultSet() throws SQLException {
200
201 return null;
202 }
203
204 @Override
205 public int getResultSetConcurrency() throws SQLException {
206
207 return 0;
208 }
209
210 @Override
211 public int getResultSetHoldability() throws SQLException {
212
213 return 0;
214 }
215
216 @Override
217 public int getResultSetType() throws SQLException {
218
219 return 0;
220 }
221
222 @Override
223 public int getUpdateCount() throws SQLException {
224
225 return 0;
226 }
227
228 @Override
229 public SQLWarning getWarnings() throws SQLException {
230
231 return null;
232 }
233
234 @Override
235 public boolean isCloseOnCompletion() throws SQLException {
236
237 return false;
238 }
239
240 @Override
241 public boolean isClosed() throws SQLException {
242
243 return false;
244 }
245
246 @Override
247 public boolean isPoolable() throws SQLException {
248
249 return false;
250 }
251
252 @Override
253 public void setCursorName(final String name) throws SQLException {
254
255
256 }
257
258 @Override
259 public void setEscapeProcessing(final boolean enable) throws SQLException {
260
261
262 }
263
264 @Override
265 public void setFetchDirection(final int direction) throws SQLException {
266
267
268 }
269
270 @Override
271 public void setFetchSize(final int rows) throws SQLException {
272
273
274 }
275
276 @Override
277 public void setMaxFieldSize(final int max) throws SQLException {
278
279
280 }
281
282 @Override
283 public void setMaxRows(final int max) throws SQLException {
284
285
286 }
287
288 @Override
289 public void setPoolable(final boolean poolable) throws SQLException {
290
291
292 }
293
294 @Override
295 public void setQueryTimeout(final int seconds) throws SQLException {
296
297
298 }
299
300 @Override
301 public boolean isWrapperFor(final Class<?> iface) throws SQLException {
302
303 return false;
304 }
305
306 @Override
307 public <T> T unwrap(final Class<T> iface) throws SQLException {
308
309 return null;
310 }
311
312 @Override
313 public void addBatch() throws SQLException {
314
315
316 }
317
318 @Override
319 public void clearParameters() throws SQLException {
320
321
322 }
323
324 @Override
325 public boolean execute() throws SQLException {
326
327 return false;
328 }
329
330 @Override
331 public ResultSet executeQuery() throws SQLException {
332 return new NullResultSet();
333 }
334
335 @Override
336 public int executeUpdate() throws SQLException {
337
338 return 0;
339 }
340
341 @Override
342 public ResultSetMetaData getMetaData() throws SQLException {
343
344 return null;
345 }
346
347 @Override
348 public ParameterMetaData getParameterMetaData() throws SQLException {
349
350 return null;
351 }
352
353 @Override
354 public void setArray(final int parameterIndex, final Array x) throws SQLException {
355
356
357 }
358
359 @Override
360 public void setAsciiStream(final int parameterIndex, final InputStream x) throws SQLException {
361
362
363 }
364
365 @Override
366 public void setAsciiStream(final int parameterIndex, final InputStream x, final int length) throws SQLException {
367
368
369 }
370
371 @Override
372 public void setAsciiStream(final int parameterIndex, final InputStream x, final long length) throws SQLException {
373
374
375 }
376
377 @Override
378 public void setBigDecimal(final int parameterIndex, final BigDecimal x) throws SQLException {
379
380
381 }
382
383 @Override
384 public void setBinaryStream(final int parameterIndex, final InputStream x) throws SQLException {
385
386
387 }
388
389 @Override
390 public void setBinaryStream(final int parameterIndex, final InputStream x, final int length) throws SQLException {
391
392
393 }
394
395 @Override
396 public void setBinaryStream(final int parameterIndex, final InputStream x, final long length) throws SQLException {
397
398
399 }
400
401 @Override
402 public void setBlob(final int parameterIndex, final Blob x) throws SQLException {
403
404
405 }
406
407 @Override
408 public void setBlob(final int parameterIndex, final InputStream inputStream) throws SQLException {
409
410
411 }
412
413 @Override
414 public void setBlob(final int parameterIndex, final InputStream inputStream, final long length) throws SQLException {
415
416
417 }
418
419 @Override
420 public void setBoolean(final int parameterIndex, final boolean x) throws SQLException {
421
422
423 }
424
425 @Override
426 public void setByte(final int parameterIndex, final byte x) throws SQLException {
427
428
429 }
430
431 @Override
432 public void setBytes(final int parameterIndex, final byte[] x) throws SQLException {
433
434
435 }
436
437 @Override
438 public void setCharacterStream(final int parameterIndex, final Reader reader) throws SQLException {
439
440
441 }
442
443 @Override
444 public void setCharacterStream(final int parameterIndex, final Reader reader, final int length) throws SQLException {
445
446
447 }
448
449 @Override
450 public void setCharacterStream(final int parameterIndex, final Reader reader, final long length) throws SQLException {
451
452
453 }
454
455 @Override
456 public void setClob(final int parameterIndex, final Clob x) throws SQLException {
457
458
459 }
460
461 @Override
462 public void setClob(final int parameterIndex, final Reader reader) throws SQLException {
463
464
465 }
466
467 @Override
468 public void setClob(final int parameterIndex, final Reader reader, final long length) throws SQLException {
469
470
471 }
472
473 @Override
474 public void setDate(final int parameterIndex, final Date x) throws SQLException {
475
476
477 }
478
479 @Override
480 public void setDate(final int parameterIndex, final Date x, final Calendar cal) throws SQLException {
481
482
483 }
484
485 @Override
486 public void setDouble(final int parameterIndex, final double x) throws SQLException {
487
488
489 }
490
491 @Override
492 public void setFloat(final int parameterIndex, final float x) throws SQLException {
493
494
495 }
496
497 @Override
498 public void setInt(final int parameterIndex, final int x) throws SQLException {
499
500
501 }
502
503 @Override
504 public void setLong(final int parameterIndex, final long x) throws SQLException {
505
506
507 }
508
509 @Override
510 public void setNCharacterStream(final int parameterIndex, final Reader value) throws SQLException {
511
512
513 }
514
515 @Override
516 public void setNCharacterStream(final int parameterIndex, final Reader value, final long length) throws SQLException {
517
518
519 }
520
521 @Override
522 public void setNClob(final int parameterIndex, final NClob value) throws SQLException {
523
524
525 }
526
527 @Override
528 public void setNClob(final int parameterIndex, final Reader reader) throws SQLException {
529
530
531 }
532
533 @Override
534 public void setNClob(final int parameterIndex, final Reader reader, final long length) throws SQLException {
535
536
537 }
538
539 @Override
540 public void setNString(final int parameterIndex, final String value) throws SQLException {
541
542
543 }
544
545 @Override
546 public void setNull(final int parameterIndex, final int sqlType) throws SQLException {
547
548
549 }
550
551 @Override
552 public void setNull(final int parameterIndex, final int sqlType, final String typeName) throws SQLException {
553
554
555 }
556
557 @Override
558 public void setObject(final int parameterIndex, final Object x) throws SQLException {
559
560
561 }
562
563 @Override
564 public void setObject(final int parameterIndex, final Object x, final int targetSqlType) throws SQLException {
565
566
567 }
568
569 @Override
570 public void setObject(final int parameterIndex, final Object x, final int targetSqlType, final int scaleOrLength) throws SQLException {
571
572
573 }
574
575 @Override
576 public void setRef(final int parameterIndex, final Ref x) throws SQLException {
577
578
579 }
580
581 @Override
582 public void setRowId(final int parameterIndex, final RowId x) throws SQLException {
583
584
585 }
586
587 @Override
588 public void setSQLXML(final int parameterIndex, final SQLXML xmlObject) throws SQLException {
589
590
591 }
592
593 @Override
594 public void setShort(final int parameterIndex, final short x) throws SQLException {
595
596
597 }
598
599 @Override
600 public void setString(final int parameterIndex, final String x) throws SQLException {
601
602
603 }
604
605 @Override
606 public void setTime(final int parameterIndex, final Time x) throws SQLException {
607
608
609 }
610
611 @Override
612 public void setTime(final int parameterIndex, final Time x, final Calendar cal) throws SQLException {
613
614
615 }
616
617 @Override
618 public void setTimestamp(final int parameterIndex, final Timestamp x) throws SQLException {
619
620
621 }
622
623 @Override
624 public void setTimestamp(final int parameterIndex, final Timestamp x, final Calendar cal) throws SQLException {
625
626
627 }
628
629 @Override
630 public void setURL(final int parameterIndex, final URL x) throws SQLException {
631
632
633 }
634
635 @Override
636 public void setUnicodeStream(final int parameterIndex, final InputStream x, final int length) throws SQLException {
637
638
639 }
640
641 }