1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 package org.melati.poem.dbms.test.sql;
46
47 import java.io.InputStream;
48 import java.io.Reader;
49 import java.sql.NClob;
50 import java.sql.RowId;
51 import java.sql.PreparedStatement;
52 import java.sql.SQLException;
53 import java.sql.SQLXML;
54
55
56
57
58
59
60
61
62 public abstract class ThrowingPreparedStatementJdbc4
63 extends ThrowingPreparedStatementJdbc3
64 implements PreparedStatement {
65
66
67
68
69
70
71
72
73
74
75
76 public void setAsciiStream(int parameterIndex, InputStream x, long length)
77 throws SQLException {
78 if (shouldThrow(this.getClass().getInterfaces()[0], "setAsciiStream"))
79 throw new SQLException("PreparedStatement bombed");
80 it.setAsciiStream(parameterIndex, x, length);
81 }
82
83
84
85
86
87 public void setAsciiStream(int parameterIndex, InputStream x)
88 throws SQLException {
89 if (shouldThrow(this.getClass().getInterfaces()[0], "setAsciiStream"))
90 throw new SQLException("PreparedStatement bombed");
91 it.setAsciiStream(parameterIndex, x);
92 }
93
94
95
96
97
98 public void setBinaryStream(int parameterIndex, InputStream x, long length)
99 throws SQLException {
100 if (shouldThrow(this.getClass().getInterfaces()[0], "setBinaryStream"))
101 throw new SQLException("PreparedStatement bombed");
102 it.setBinaryStream(parameterIndex, x, length);
103 }
104
105
106
107
108
109 public void setBinaryStream(int parameterIndex, InputStream x)
110 throws SQLException {
111 if (shouldThrow(this.getClass().getInterfaces()[0], "setBinaryStream"))
112 throw new SQLException("PreparedStatement bombed");
113 it.setBinaryStream(parameterIndex, x);
114 }
115
116
117
118
119
120 public void setBlob(int parameterIndex, InputStream inputStream, long length)
121 throws SQLException {
122 if (shouldThrow(this.getClass().getInterfaces()[0], "setBlob"))
123 throw new SQLException("PreparedStatement bombed");
124 it.setBlob(parameterIndex, inputStream, length);
125 }
126
127
128
129
130
131 public void setBlob(int parameterIndex, InputStream inputStream)
132 throws SQLException {
133 if (shouldThrow(this.getClass().getInterfaces()[0], "setBlob"))
134 throw new SQLException("PreparedStatement bombed");
135 it.setBlob(parameterIndex, inputStream);
136 }
137
138
139
140
141
142 public void setCharacterStream(int parameterIndex, Reader reader, long length)
143 throws SQLException {
144 if (shouldThrow(this.getClass().getInterfaces()[0], "setCharacterStream"))
145 throw new SQLException("PreparedStatement bombed");
146 it.setCharacterStream(parameterIndex, reader, length);
147 }
148
149
150
151
152
153 public void setCharacterStream(int parameterIndex, Reader reader)
154 throws SQLException {
155 if (shouldThrow(this.getClass().getInterfaces()[0], "setCharacterStream"))
156 throw new SQLException("PreparedStatement bombed");
157 it.setCharacterStream(parameterIndex, reader);
158 }
159
160
161
162
163
164 public void setClob(int parameterIndex, Reader reader, long length)
165 throws SQLException {
166 if (shouldThrow(this.getClass().getInterfaces()[0], "setClob"))
167 throw new SQLException("PreparedStatement bombed");
168 it.setClob(parameterIndex, reader, length);
169 }
170
171
172
173
174
175 public void setClob(int parameterIndex, Reader reader) throws SQLException {
176 if (shouldThrow(this.getClass().getInterfaces()[0], "setClob"))
177 throw new SQLException("PreparedStatement bombed");
178 it.setClob(parameterIndex, reader);
179 }
180
181
182
183
184
185 public void setNCharacterStream(int parameterIndex, Reader value, long length)
186 throws SQLException {
187 if (shouldThrow(this.getClass().getInterfaces()[0], "setNCharacterStream"))
188 throw new SQLException("PreparedStatement bombed");
189 it.setNCharacterStream(parameterIndex, value, length);
190 }
191
192
193
194
195
196 public void setNCharacterStream(int parameterIndex, Reader value)
197 throws SQLException {
198 if (shouldThrow(this.getClass().getInterfaces()[0], "setNCharacterStream"))
199 throw new SQLException("PreparedStatement bombed");
200 it.setNCharacterStream(parameterIndex, value);
201 }
202
203
204
205
206
207 public void setNClob(int parameterIndex, NClob value) throws SQLException {
208 if (shouldThrow(this.getClass().getInterfaces()[0], "setNClob"))
209 throw new SQLException("PreparedStatement bombed");
210 it.setNClob(parameterIndex, value);
211 }
212
213
214
215
216
217 public void setNClob(int parameterIndex, Reader reader, long length)
218 throws SQLException {
219 if (shouldThrow(this.getClass().getInterfaces()[0], "setNClob"))
220 throw new SQLException("PreparedStatement bombed");
221 it.setNClob(parameterIndex, reader, length);
222 }
223
224
225
226
227
228 public void setNClob(int parameterIndex, Reader reader) throws SQLException {
229 if (shouldThrow(this.getClass().getInterfaces()[0], "setNClob"))
230 throw new SQLException("PreparedStatement bombed");
231 it.setNClob(parameterIndex, reader);
232 }
233
234
235
236
237
238 public void setNString(int parameterIndex, String value) throws SQLException {
239 if (shouldThrow(this.getClass().getInterfaces()[0], "setNString"))
240 throw new SQLException("PreparedStatement bombed");
241 it.setNString(parameterIndex, value);
242 }
243
244
245
246
247
248 public void setRowId(int parameterIndex, RowId x) throws SQLException {
249 if (shouldThrow(this.getClass().getInterfaces()[0], "setRowId"))
250 throw new SQLException("PreparedStatement bombed");
251 it.setRowId(parameterIndex, x);
252 }
253
254
255
256
257
258 public void setSQLXML(int parameterIndex, SQLXML xmlObject)
259 throws SQLException {
260 if (shouldThrow(this.getClass().getInterfaces()[0], "setSQLXML"))
261 throw new SQLException("PreparedStatement bombed");
262 it.setSQLXML(parameterIndex, xmlObject);
263 }
264
265
266
267
268
269 public boolean isClosed() throws SQLException {
270 if (shouldThrow(this.getClass().getInterfaces()[0], "isClosed"))
271 throw new SQLException("PreparedStatement bombed");
272 return it.isClosed();
273 }
274
275
276
277
278
279 public boolean isPoolable() throws SQLException {
280 if (shouldThrow(this.getClass().getInterfaces()[0], "isPoolable"))
281 throw new SQLException("PreparedStatement bombed");
282 return it.isPoolable();
283 }
284
285
286
287
288
289 public void setPoolable(boolean poolable) throws SQLException {
290 if (shouldThrow(this.getClass().getInterfaces()[0], "setPoolable"))
291 throw new SQLException("PreparedStatement bombed");
292 it.setPoolable(poolable);
293 }
294
295
296
297
298
299 public boolean isWrapperFor(Class<?> iface) throws SQLException {
300 if (shouldThrow(this.getClass().getInterfaces()[0], "isWrapperFor"))
301 throw new SQLException("PreparedStatement bombed");
302 return it.isWrapperFor(iface);
303 }
304
305
306
307
308
309 public <T> T unwrap(Class<T> iface) throws SQLException {
310 if (shouldThrow(this.getClass().getInterfaces()[0], "unwrap"))
311 throw new SQLException("PreparedStatement bombed");
312 return it.unwrap(iface);
313 }
314
315
316
317
318 }