~ubuntu-branches/ubuntu/oneiric/mysql-connector-java/oneiric

« back to all changes in this revision

Viewing changes to src/com/mysql/jdbc/jdbc2/optional/StatementWrapper.java

  • Committer: Bazaar Package Importer
  • Author(s): Marcus Better
  • Date: 2006-12-29 13:29:04 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20061229132904-uj7edcmwgtuxh6li
Tags: 5.0.4+dfsg-2
Corrected the symlink `/usr/share/java/mysql.jar'. Thanks to Javier
Kohen. (Closes: #404858)

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
                                return this.wrappedConn;
65
65
                        }
66
66
 
67
 
                        throw new SQLException("Statement already closed",
 
67
                        throw SQLError.createSQLException("Statement already closed",
68
68
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
69
69
                } catch (SQLException sqlEx) {
70
70
                        checkAndFireConnectionError(sqlEx);
86
86
                        if (this.wrappedStmt != null) {
87
87
                                this.wrappedStmt.setCursorName(name);
88
88
                        } else {
89
 
                                throw new SQLException("Statement already closed",
 
89
                                throw SQLError.createSQLException("Statement already closed",
90
90
                                                SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
91
91
                        }
92
92
                } catch (SQLException sqlEx) {
104
104
                        if (this.wrappedStmt != null) {
105
105
                                this.wrappedStmt.setEscapeProcessing(enable);
106
106
                        } else {
107
 
                                throw new SQLException("Statement already closed",
 
107
                                throw SQLError.createSQLException("Statement already closed",
108
108
                                                SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
109
109
                        }
110
110
                } catch (SQLException sqlEx) {
122
122
                        if (this.wrappedStmt != null) {
123
123
                                this.wrappedStmt.setFetchDirection(direction);
124
124
                        } else {
125
 
                                throw new SQLException("Statement already closed",
 
125
                                throw SQLError.createSQLException("Statement already closed",
126
126
                                                SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
127
127
                        }
128
128
                } catch (SQLException sqlEx) {
141
141
                                return this.wrappedStmt.getFetchDirection();
142
142
                        }
143
143
 
144
 
                        throw new SQLException("Statement already closed",
 
144
                        throw SQLError.createSQLException("Statement already closed",
145
145
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
146
146
                } catch (SQLException sqlEx) {
147
147
                        checkAndFireConnectionError(sqlEx);
163
163
                        if (this.wrappedStmt != null) {
164
164
                                this.wrappedStmt.setFetchSize(rows);
165
165
                        } else {
166
 
                                throw new SQLException("Statement already closed",
 
166
                                throw SQLError.createSQLException("Statement already closed",
167
167
                                                SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
168
168
                        }
169
169
                } catch (SQLException sqlEx) {
182
182
                                return this.wrappedStmt.getFetchSize();
183
183
                        }
184
184
 
185
 
                        throw new SQLException("Statement already closed",
 
185
                        throw SQLError.createSQLException("Statement already closed",
186
186
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
187
187
                } catch (SQLException sqlEx) {
188
188
                        checkAndFireConnectionError(sqlEx);
204
204
                                return this.wrappedStmt.getGeneratedKeys();
205
205
                        }
206
206
 
207
 
                        throw new SQLException("Statement already closed",
 
207
                        throw SQLError.createSQLException("Statement already closed",
208
208
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
209
209
                } catch (SQLException sqlEx) {
210
210
                        checkAndFireConnectionError(sqlEx);
226
226
                        if (this.wrappedStmt != null) {
227
227
                                this.wrappedStmt.setMaxFieldSize(max);
228
228
                        } else {
229
 
                                throw new SQLException("Statement already closed",
 
229
                                throw SQLError.createSQLException("Statement already closed",
230
230
                                                SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
231
231
                        }
232
232
                } catch (SQLException sqlEx) {
245
245
                                return this.wrappedStmt.getMaxFieldSize();
246
246
                        }
247
247
 
248
 
                        throw new SQLException("Statement already closed",
 
248
                        throw SQLError.createSQLException("Statement already closed",
249
249
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
250
250
                } catch (SQLException sqlEx) {
251
251
                        checkAndFireConnectionError(sqlEx);
266
266
                        if (this.wrappedStmt != null) {
267
267
                                this.wrappedStmt.setMaxRows(max);
268
268
                        } else {
269
 
                                throw new SQLException("Statement already closed",
 
269
                                throw SQLError.createSQLException("Statement already closed",
270
270
                                                SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
271
271
                        }
272
272
                } catch (SQLException sqlEx) {
285
285
                                return this.wrappedStmt.getMaxRows();
286
286
                        }
287
287
 
288
 
                        throw new SQLException("Statement already closed",
 
288
                        throw SQLError.createSQLException("Statement already closed",
289
289
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
290
290
                } catch (SQLException sqlEx) {
291
291
                        checkAndFireConnectionError(sqlEx);
307
307
                                return this.wrappedStmt.getMoreResults();
308
308
                        }
309
309
 
310
 
                        throw new SQLException("Statement already closed",
 
310
                        throw SQLError.createSQLException("Statement already closed",
311
311
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
312
312
                } catch (SQLException sqlEx) {
313
313
                        checkAndFireConnectionError(sqlEx);
327
327
                                return this.wrappedStmt.getMoreResults(current);
328
328
                        }
329
329
 
330
 
                        throw new SQLException("Statement already closed",
 
330
                        throw SQLError.createSQLException("Statement already closed",
331
331
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
332
332
                } catch (SQLException sqlEx) {
333
333
                        checkAndFireConnectionError(sqlEx);
346
346
                        if (this.wrappedStmt != null) {
347
347
                                this.wrappedStmt.setQueryTimeout(seconds);
348
348
                        } else {
349
 
                                throw new SQLException("Statement already closed",
 
349
                                throw SQLError.createSQLException("Statement already closed",
350
350
                                                SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
351
351
                        }
352
352
                } catch (SQLException sqlEx) {
365
365
                                return this.wrappedStmt.getQueryTimeout();
366
366
                        }
367
367
 
368
 
                        throw new SQLException("Statement already closed",
 
368
                        throw SQLError.createSQLException("Statement already closed",
369
369
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
370
370
                } catch (SQLException sqlEx) {
371
371
                        checkAndFireConnectionError(sqlEx);
389
389
                                return rs;
390
390
                        }
391
391
 
392
 
                        throw new SQLException("Statement already closed",
 
392
                        throw SQLError.createSQLException("Statement already closed",
393
393
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
394
394
                } catch (SQLException sqlEx) {
395
395
                        checkAndFireConnectionError(sqlEx);
409
409
                                return this.wrappedStmt.getResultSetConcurrency();
410
410
                        }
411
411
 
412
 
                        throw new SQLException("Statement already closed",
 
412
                        throw SQLError.createSQLException("Statement already closed",
413
413
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
414
414
                } catch (SQLException sqlEx) {
415
415
                        checkAndFireConnectionError(sqlEx);
429
429
                                return this.wrappedStmt.getResultSetHoldability();
430
430
                        }
431
431
 
432
 
                        throw new SQLException("Statement already closed",
 
432
                        throw SQLError.createSQLException("Statement already closed",
433
433
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
434
434
                } catch (SQLException sqlEx) {
435
435
                        checkAndFireConnectionError(sqlEx);
449
449
                                return this.wrappedStmt.getResultSetType();
450
450
                        }
451
451
 
452
 
                        throw new SQLException("Statement already closed",
 
452
                        throw SQLError.createSQLException("Statement already closed",
453
453
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
454
454
                } catch (SQLException sqlEx) {
455
455
                        checkAndFireConnectionError(sqlEx);
469
469
                                return this.wrappedStmt.getUpdateCount();
470
470
                        }
471
471
 
472
 
                        throw new SQLException("Statement already closed",
 
472
                        throw SQLError.createSQLException("Statement already closed",
473
473
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
474
474
                } catch (SQLException sqlEx) {
475
475
                        checkAndFireConnectionError(sqlEx);
489
489
                                return this.wrappedStmt.getWarnings();
490
490
                        }
491
491
 
492
 
                        throw new SQLException("Statement already closed",
 
492
                        throw SQLError.createSQLException("Statement already closed",
493
493
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
494
494
                } catch (SQLException sqlEx) {
495
495
                        checkAndFireConnectionError(sqlEx);
588
588
                                return this.wrappedStmt.execute(sql, autoGeneratedKeys);
589
589
                        }
590
590
 
591
 
                        throw new SQLException("Statement already closed",
 
591
                        throw SQLError.createSQLException("Statement already closed",
592
592
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
593
593
                } catch (SQLException sqlEx) {
594
594
                        checkAndFireConnectionError(sqlEx);
611
611
                                return this.wrappedStmt.execute(sql, columnIndexes);
612
612
                        }
613
613
 
614
 
                        throw new SQLException("Statement already closed",
 
614
                        throw SQLError.createSQLException("Statement already closed",
615
615
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
616
616
                } catch (SQLException sqlEx) {
617
617
                        checkAndFireConnectionError(sqlEx);
635
635
                                return this.wrappedStmt.execute(sql, columnNames);
636
636
                        }
637
637
 
638
 
                        throw new SQLException("Statement already closed",
 
638
                        throw SQLError.createSQLException("Statement already closed",
639
639
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
640
640
                } catch (SQLException sqlEx) {
641
641
                        checkAndFireConnectionError(sqlEx);
658
658
                                return this.wrappedStmt.execute(sql);
659
659
                        }
660
660
 
661
 
                        throw new SQLException("Statement already closed",
 
661
                        throw SQLError.createSQLException("Statement already closed",
662
662
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
663
663
                } catch (SQLException sqlEx) {
664
664
                        checkAndFireConnectionError(sqlEx);
681
681
                                return this.wrappedStmt.executeBatch();
682
682
                        }
683
683
 
684
 
                        throw new SQLException("Statement already closed",
 
684
                        throw SQLError.createSQLException("Statement already closed",
685
685
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
686
686
                } catch (SQLException sqlEx) {
687
687
                        checkAndFireConnectionError(sqlEx);
708
708
                                return rs;
709
709
                        }
710
710
 
711
 
                        throw new SQLException("Statement already closed",
 
711
                        throw SQLError.createSQLException("Statement already closed",
712
712
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
713
713
                } catch (SQLException sqlEx) {
714
714
                        checkAndFireConnectionError(sqlEx);
732
732
                                return this.wrappedStmt.executeUpdate(sql, autoGeneratedKeys);
733
733
                        }
734
734
 
735
 
                        throw new SQLException("Statement already closed",
 
735
                        throw SQLError.createSQLException("Statement already closed",
736
736
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
737
737
                } catch (SQLException sqlEx) {
738
738
                        checkAndFireConnectionError(sqlEx);
755
755
                                return this.wrappedStmt.executeUpdate(sql, columnIndexes);
756
756
                        }
757
757
 
758
 
                        throw new SQLException("Statement already closed",
 
758
                        throw SQLError.createSQLException("Statement already closed",
759
759
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
760
760
                } catch (SQLException sqlEx) {
761
761
                        checkAndFireConnectionError(sqlEx);
779
779
                                return this.wrappedStmt.executeUpdate(sql, columnNames);
780
780
                        }
781
781
 
782
 
                        throw new SQLException("Statement already closed",
 
782
                        throw SQLError.createSQLException("Statement already closed",
783
783
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
784
784
                } catch (SQLException sqlEx) {
785
785
                        checkAndFireConnectionError(sqlEx);
801
801
                                return this.wrappedStmt.executeUpdate(sql);
802
802
                        }
803
803
 
804
 
                        throw new SQLException("Statement already closed",
 
804
                        throw SQLError.createSQLException("Statement already closed",
805
805
                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
806
806
                } catch (SQLException sqlEx) {
807
807
                        checkAndFireConnectionError(sqlEx);
818
818
                                ((com.mysql.jdbc.Statement) this.wrappedStmt)
819
819
                                                .enableStreamingResults();
820
820
                        } else {
821
 
                                throw new SQLException(
 
821
                                throw SQLError.createSQLException(
822
822
                                                "No operations allowed after statement closed",
823
823
                                                SQLError.SQL_STATE_GENERAL_ERROR);
824
824
                        }