35 |
obligated to do so. If you do not wish to do so, delete this |
obligated to do so. If you do not wish to do so, delete this |
36 |
exception statement from your version. */ |
exception statement from your version. */ |
37 |
|
|
|
|
|
38 |
package java.sql; |
package java.sql; |
39 |
|
|
40 |
import java.io.InputStream; |
import java.io.InputStream; |
41 |
import java.io.Reader; |
import java.io.Reader; |
42 |
import java.math.BigDecimal; |
import java.math.BigDecimal; |
43 |
|
import java.net.URL; |
44 |
import java.util.Calendar; |
import java.util.Calendar; |
45 |
|
|
46 |
/** |
/** |
47 |
* This interface provides a mechanism for executing pre-compiled |
* This interface provides a mechanism for executing pre-compiled |
48 |
* statements. This provides greater efficiency when calling the same |
* statements. This provides greater efficiency when calling the same |
49 |
* statement multiple times. Parameters are allowed in a statement, |
* statement multiple times. Parameters are allowed in a statement, |
50 |
* providings for maximum reusability. |
* providings for maximum reusability. |
51 |
* |
* |
52 |
* @author Aaron M. Renn (arenn@urbanophile.com) |
* @author Aaron M. Renn (arenn@urbanophile.com) |
53 |
*/ |
*/ |
54 |
public interface PreparedStatement extends Statement |
public interface PreparedStatement extends Statement |
55 |
{ |
{ |
56 |
|
/** |
57 |
/** |
* This method executes a prepared SQL query and returns its ResultSet. |
58 |
* This method populates the specified parameter with a SQL NULL value |
* |
59 |
* for the specified type. |
* @return The ResultSet of the SQL statement. |
60 |
* |
* @exception SQLException If an error occurs. |
61 |
* @param index The index of the parameter to set. |
*/ |
62 |
* @param type The SQL type identifier of the parameter from <code>Types</code> |
public ResultSet executeQuery() throws SQLException; |
63 |
* |
|
64 |
* @exception SQLException If an error occurs. |
/** |
65 |
*/ |
* This method executes an SQL INSERT, UPDATE or DELETE statement. SQL |
66 |
public abstract void |
* statements that return nothing such as SQL DDL statements can be executed. |
67 |
setNull(int index, int type) throws SQLException; |
* |
68 |
|
* @return The result is either the row count for INSERT, UPDATE or DELETE |
69 |
/*************************************************************************/ |
* statements; or 0 for SQL statements that return nothing. |
70 |
|
* @exception SQLException If an error occurs. |
71 |
/** |
*/ |
72 |
* This method populates the specified parameter with a SQL NULL value |
public int executeUpdate() throws SQLException; |
73 |
* for the specified type. |
|
74 |
* |
/** |
75 |
* @param index The index of the parameter to set. |
* This method populates the specified parameter with a SQL NULL value |
76 |
* @param type The SQL type identifier of the parameter from <code>Types</code> |
* for the specified type. |
77 |
* @param name The name of the data type, for user defined types. |
* |
78 |
* |
* @param index The index of the parameter to set. |
79 |
* @exception SQLException If an error occurs. |
* @param type The SQL type identifier of the parameter from <code>Types</code> |
80 |
*/ |
* |
81 |
public abstract void |
* @exception SQLException If an error occurs. |
82 |
setNull(int index, int type, String name) throws SQLException; |
*/ |
83 |
|
public void setNull(int parameterIndex, int sqlType) throws SQLException; |
84 |
/*************************************************************************/ |
|
85 |
|
/** |
86 |
/** |
* This method sets the specified parameter from the given Java |
87 |
* This method sets the specified parameter from the given Java |
* <code>boolean</code> value. |
88 |
* <code>boolean</code> value. |
* |
89 |
* |
* @param index The index of the parameter value to set. |
90 |
* @param index The index of the parameter value to set. |
* @param value The value of the parameter. |
91 |
* @param value The value of the parameter. |
* @exception SQLException If an error occurs. |
92 |
* |
*/ |
93 |
* @exception SQLException If an error occurs. |
public void setBoolean(int parameterIndex, boolean x) throws SQLException; |
94 |
*/ |
|
95 |
public abstract void |
/** |
96 |
setBoolean(int index, boolean value) throws SQLException; |
* This method sets the specified parameter from the given Java |
97 |
|
* <code>byte</code> value. |
98 |
/*************************************************************************/ |
* |
99 |
|
* @param index The index of the parameter value to set. |
100 |
/** |
* @param value The value of the parameter. |
101 |
* This method sets the specified parameter from the given Java |
* @exception SQLException If an error occurs. |
102 |
* <code>byte</code> value. |
*/ |
103 |
* |
public void setByte(int parameterIndex, byte x) throws SQLException; |
104 |
* @param index The index of the parameter value to set. |
|
105 |
* @param value The value of the parameter. |
/** |
106 |
* |
* This method sets the specified parameter from the given Java |
107 |
* @exception SQLException If an error occurs. |
* <code>short</code> value. |
108 |
*/ |
* |
109 |
public abstract void |
* @param index The index of the parameter value to set. |
110 |
setByte(int index, byte value) throws SQLException; |
* @param value The value of the parameter. |
111 |
|
* @exception SQLException If an error occurs. |
112 |
/*************************************************************************/ |
*/ |
113 |
|
public void setShort(int parameterIndex, short x) throws SQLException; |
114 |
/** |
|
115 |
* This method sets the specified parameter from the given Java |
/** |
116 |
* <code>short</code> value. |
* This method sets the specified parameter from the given Java |
117 |
* |
* <code>int</code> value. |
118 |
* @param index The index of the parameter value to set. |
* |
119 |
* @param value The value of the parameter. |
* @param index The index of the parameter value to set. |
120 |
* |
* @param value The value of the parameter. |
121 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
122 |
*/ |
*/ |
123 |
public abstract void |
public void setInt(int parameterIndex, int x) throws SQLException; |
124 |
setShort(int index, short value) throws SQLException; |
|
125 |
|
/** |
126 |
/*************************************************************************/ |
* This method sets the specified parameter from the given Java |
127 |
|
* <code>long</code> value. |
128 |
/** |
* |
129 |
* This method sets the specified parameter from the given Java |
* @param index The index of the parameter value to set. |
130 |
* <code>int</code> value. |
* @param value The value of the parameter. |
131 |
* |
* @exception SQLException If an error occurs. |
132 |
* @param index The index of the parameter value to set. |
*/ |
133 |
* @param value The value of the parameter. |
public void setLong(int parameterIndex, long x) throws SQLException; |
134 |
* |
|
135 |
* @exception SQLException If an error occurs. |
/** |
136 |
*/ |
* This method sets the specified parameter from the given Java |
137 |
public abstract void |
* <code>float</code> value. |
138 |
setInt(int index, int value) throws SQLException; |
* |
139 |
|
* @param index The index of the parameter value to set. |
140 |
/*************************************************************************/ |
* @param value The value of the parameter. |
141 |
|
* @exception SQLException If an error occurs. |
142 |
/** |
*/ |
143 |
* This method sets the specified parameter from the given Java |
public void setFloat(int parameterIndex, float x) throws SQLException; |
144 |
* <code>long</code> value. |
|
145 |
* |
/** |
146 |
* @param index The index of the parameter value to set. |
* This method sets the specified parameter from the given Java |
147 |
* @param value The value of the parameter. |
* <code>double</code> value. |
148 |
* |
* |
149 |
* @exception SQLException If an error occurs. |
* @param index The index of the parameter value to set. |
150 |
*/ |
* @param value The value of the parameter. |
151 |
public abstract void |
* @exception SQLException If an error occurs. |
152 |
setLong(int index, long value) throws SQLException; |
*/ |
153 |
|
public void setDouble(int parameterIndex, double x) throws SQLException; |
154 |
/*************************************************************************/ |
|
155 |
|
/** |
156 |
/** |
* This method sets the specified parameter from the given Java |
157 |
* This method sets the specified parameter from the given Java |
* <code>java.math.BigDecimal</code> value. |
158 |
* <code>float</code> value. |
* |
159 |
* |
* @param index The index of the parameter value to set. |
160 |
* @param index The index of the parameter value to set. |
* @param value The value of the parameter. |
161 |
* @param value The value of the parameter. |
* @exception SQLException If an error occurs. |
162 |
* |
*/ |
163 |
* @exception SQLException If an error occurs. |
public void setBigDecimal(int parameterIndex, BigDecimal x) throws |
164 |
*/ |
SQLException; |
165 |
public abstract void |
|
166 |
setFloat(int index, float value) throws SQLException; |
/** |
167 |
|
* This method sets the specified parameter from the given Java |
168 |
/*************************************************************************/ |
* <code>String</code> value. |
169 |
|
* |
170 |
/** |
* @param index The index of the parameter value to set. |
171 |
* This method sets the specified parameter from the given Java |
* @param value The value of the parameter. |
172 |
* <code>double</code> value. |
* @exception SQLException If an error occurs. |
173 |
* |
*/ |
174 |
* @param index The index of the parameter value to set. |
public void setString(int parameterIndex, String x) throws SQLException; |
175 |
* @param value The value of the parameter. |
|
176 |
* |
/** |
177 |
* @exception SQLException If an error occurs. |
* This method sets the specified parameter from the given Java |
178 |
*/ |
* <code>byte</code> array value. |
179 |
public abstract void |
* |
180 |
setDouble(int index, double value) throws SQLException; |
* @param index The index of the parameter value to set. |
181 |
|
* @param value The value of the parameter. |
182 |
/*************************************************************************/ |
* @exception SQLException If an error occurs. |
183 |
|
*/ |
184 |
/** |
public void setBytes(int parameterIndex, byte[] x) throws SQLException; |
185 |
* This method sets the specified parameter from the given Java |
|
186 |
* <code>String</code> value. |
/** |
187 |
* |
* This method sets the specified parameter from the given Java |
188 |
* @param index The index of the parameter value to set. |
* <code>java.sql.Date</code> value. |
189 |
* @param value The value of the parameter. |
* |
190 |
* |
* @param index The index of the parameter value to set. |
191 |
* @exception SQLException If an error occurs. |
* @param value The value of the parameter. |
192 |
*/ |
* @exception SQLException If an error occurs. |
193 |
public abstract void |
*/ |
194 |
setString(int index, String value) throws SQLException; |
public void setDate(int parameterIndex, Date x) throws SQLException; |
195 |
|
|
196 |
/*************************************************************************/ |
/** |
197 |
|
* This method sets the specified parameter from the given Java |
198 |
/** |
* <code>java.sql.Time</code> value. |
199 |
* This method sets the specified parameter from the given Java |
* |
200 |
* <code>byte</code> array value. |
* @param index The index of the parameter value to set. |
201 |
* |
* @param value The value of the parameter. |
202 |
* @param index The index of the parameter value to set. |
* @exception SQLException If an error occurs. |
203 |
* @param value The value of the parameter. |
*/ |
204 |
* |
public void setTime(int parameterIndex, Time x) throws SQLException; |
205 |
* @exception SQLException If an error occurs. |
|
206 |
*/ |
/** |
207 |
public abstract void |
* This method sets the specified parameter from the given Java |
208 |
setBytes(int index, byte[] value) throws SQLException; |
* <code>java.sql.Timestamp</code> value. |
209 |
|
* |
210 |
/*************************************************************************/ |
* @param index The index of the parameter value to set. |
211 |
|
* @param value The value of the parameter. |
212 |
/** |
* @exception SQLException If an error occurs. |
213 |
* This method sets the specified parameter from the given Java |
*/ |
214 |
* <code>java.math.BigDecimal</code> value. |
public void setTimestamp(int parameterIndex, Timestamp x) |
215 |
* |
throws SQLException; |
216 |
* @param index The index of the parameter value to set. |
|
217 |
* @param value The value of the parameter. |
/** |
218 |
* |
* This method sets the specified parameter from the given Java |
219 |
* @exception SQLException If an error occurs. |
* ASCII <code>InputStream</code> value. |
220 |
*/ |
* |
221 |
public abstract void |
* @param index The index of the parameter value to set. |
222 |
setBigDecimal(int index, java.math.BigDecimal value) throws SQLException; |
* @param value The value of the parameter. |
223 |
|
* @param length The number of bytes in the stream. |
224 |
/*************************************************************************/ |
* @exception SQLException If an error occurs. |
225 |
|
*/ |
226 |
/** |
public void setAsciiStream(int parameterIndex, InputStream x, int length) |
227 |
* This method sets the specified parameter from the given Java |
throws SQLException; |
228 |
* <code>java.sql.Date</code> value. |
|
229 |
* |
/** |
230 |
* @param index The index of the parameter value to set. |
* This method sets the specified parameter from the given Java |
231 |
* @param value The value of the parameter. |
* Unicode UTF-8 <code>InputStream</code> value. |
232 |
* |
* |
233 |
* @exception SQLException If an error occurs. |
* @param index The index of the parameter value to set. |
234 |
*/ |
* @param value The value of the parameter. |
235 |
public abstract void |
* @param length The number of bytes in the stream. |
236 |
setDate(int index, java.sql.Date value) throws SQLException; |
* @exception SQLException If an error occurs. |
237 |
|
* @deprecated |
238 |
/*************************************************************************/ |
*/ |
239 |
|
public void setUnicodeStream(int parameterIndex, InputStream x, int length) |
240 |
/** |
throws SQLException; |
241 |
* This method sets the specified parameter from the given Java |
|
242 |
* <code>java.sql.Date</code> value. |
/** |
243 |
* |
* This method sets the specified parameter from the given Java |
244 |
* @param index The index of the parameter value to set. |
* binary <code>InputStream</code> value. |
245 |
* @param value The value of the parameter. |
* |
246 |
* @param calendar The <code>Calendar</code> to use for timezone and locale. |
* @param index The index of the parameter value to set. |
247 |
* |
* @param value The value of the parameter. |
248 |
* @exception SQLException If an error occurs. |
* @param length The number of bytes in the stream. |
249 |
*/ |
* @exception SQLException If an error occurs. |
250 |
public abstract void |
*/ |
251 |
setDate(int index, java.sql.Date value, Calendar calendar) throws SQLException; |
public void setBinaryStream(int parameterIndex, InputStream x, int length) |
252 |
|
throws SQLException; |
253 |
/*************************************************************************/ |
|
254 |
|
/** |
255 |
/** |
* This method clears all of the input parameter that have been |
256 |
* This method sets the specified parameter from the given Java |
* set on this statement. |
257 |
* <code>java.sql.Time</code> value. |
* |
258 |
* |
* @exception SQLException If an error occurs. |
259 |
* @param index The index of the parameter value to set. |
*/ |
260 |
* @param value The value of the parameter. |
public void clearParameters() throws SQLException; |
261 |
* |
|
262 |
* @exception SQLException If an error occurs. |
/** |
263 |
*/ |
* This method sets the specified parameter from the given Java |
264 |
public abstract void |
* <code>Object</code> value. The specified SQL object type will be used. |
265 |
setTime(int index, java.sql.Time value) throws SQLException; |
* |
266 |
|
* @param index The index of the parameter value to set. |
267 |
/*************************************************************************/ |
* @param value The value of the parameter. |
268 |
|
* @param type The SQL type to use for the parameter, from <code>Types</code> |
269 |
/** |
* @param scale The scale of the value, for numeric values only. |
270 |
* This method sets the specified parameter from the given Java |
* @exception SQLException If an error occurs. |
271 |
* <code>java.sql.Time</code> value. |
* @see Types |
272 |
* |
*/ |
273 |
* @param index The index of the parameter value to set. |
public void setObject(int parameterIndex, Object x, int targetSqlType, |
274 |
* @param value The value of the parameter. |
int scale) throws SQLException; |
275 |
* @param calendar The <code>Calendar</code> to use for timezone and locale. |
|
276 |
* |
/** |
277 |
* @exception SQLException If an error occurs. |
* This method sets the specified parameter from the given Java |
278 |
*/ |
* <code>Object</code> value. The specified SQL object type will be used. |
279 |
public abstract void |
* |
280 |
setTime(int index, java.sql.Time value, Calendar calendar) throws SQLException; |
* @param index The index of the parameter value to set. |
281 |
|
* @param value The value of the parameter. |
282 |
/*************************************************************************/ |
* @param type The SQL type to use for the parameter, from <code>Types</code> |
283 |
|
* @exception SQLException If an error occurs. |
284 |
/** |
* @see Types |
285 |
* This method sets the specified parameter from the given Java |
*/ |
286 |
* <code>java.sql.Timestamp</code> value. |
public void setObject(int parameterIndex, Object x, int targetSqlType) |
287 |
* |
throws SQLException; |
288 |
* @param index The index of the parameter value to set. |
|
289 |
* @param value The value of the parameter. |
/** |
290 |
* |
* This method sets the specified parameter from the given Java |
291 |
* @exception SQLException If an error occurs. |
* <code>Object</code> value. The default object type to SQL type mapping |
292 |
*/ |
* will be used. |
293 |
public abstract void |
* |
294 |
setTimestamp(int index, java.sql.Timestamp value) throws SQLException; |
* @param index The index of the parameter value to set. |
295 |
|
* @param value The value of the parameter. |
296 |
/*************************************************************************/ |
* @exception SQLException If an error occurs. |
297 |
|
*/ |
298 |
/** |
public void setObject(int parameterIndex, Object x) throws SQLException; |
299 |
* This method sets the specified parameter from the given Java |
|
300 |
* <code>java.sql.Timestamp</code> value. |
/** |
301 |
* |
* This method executes a prepared SQL query. |
302 |
* @param index The index of the parameter value to set. |
* Some prepared statements return multiple results; the execute method |
303 |
* @param value The value of the parameter. |
* handles these complex statements as well as the simpler form of |
304 |
* @param calendar The <code>Calendar</code> to use for timezone and locale. |
* statements handled by executeQuery and executeUpdate. |
305 |
* |
* |
306 |
* @exception SQLException If an error occurs. |
* @return The result of the SQL statement. |
307 |
*/ |
* @exception SQLException If an error occurs. |
308 |
public abstract void |
*/ |
309 |
setTimestamp(int index, java.sql.Timestamp value, Calendar calendar) |
public boolean execute() throws SQLException; |
310 |
throws SQLException; |
|
311 |
|
/** |
312 |
/*************************************************************************/ |
* This method adds a set of parameters to the batch for JDBC 2.0. |
313 |
|
* @exception SQLException If an error occurs. |
314 |
/** |
*/ |
315 |
* This method sets the specified parameter from the given Java |
public void addBatch() throws SQLException; |
316 |
* ASCII <code>InputStream</code> value. |
|
317 |
* |
/** |
318 |
* @param index The index of the parameter value to set. |
* This method sets the specified parameter from the given Java |
319 |
* @param value The value of the parameter. |
* character <code>Reader</code> value. |
320 |
* @param length The number of bytes in the stream. |
* |
321 |
* |
* @param index The index of the parameter value to set. |
322 |
* @exception SQLException If an error occurs. |
* @param value The value of the parameter. |
323 |
*/ |
* @param length The number of bytes in the stream. |
324 |
public abstract void |
* @exception SQLException If an error occurs. |
325 |
setAsciiStream(int index, InputStream value, int length) throws SQLException; |
*/ |
326 |
|
public void setCharacterStream(int parameterIndex, Reader reader, |
327 |
/*************************************************************************/ |
int length) throws SQLException; |
328 |
|
|
329 |
/** |
/** |
330 |
* This method sets the specified parameter from the given Java |
* This method sets the specified parameter from the given Java |
331 |
* Unicode UTF-8 <code>InputStream</code> value. |
* <code>Ref</code> value. The default object type to SQL type mapping |
332 |
* |
* will be used. |
333 |
* @param index The index of the parameter value to set. |
* |
334 |
* @param value The value of the parameter. |
* @param index The index of the parameter value to set. |
335 |
* @param length The number of bytes in the stream. |
* @param value The value of the parameter. |
336 |
* |
* @exception SQLException If an error occurs. |
337 |
* @exception SQLException If an error occurs. |
*/ |
338 |
*/ |
public void setRef(int i, Ref x) throws SQLException; |
339 |
public abstract void |
|
340 |
setUnicodeStream(int index, InputStream value, int length) throws SQLException; |
/** |
341 |
|
* This method sets the specified parameter from the given Java |
342 |
/*************************************************************************/ |
* <code>Blob</code> value. The default object type to SQL type mapping |
343 |
|
* will be used. |
344 |
/** |
* |
345 |
* This method sets the specified parameter from the given Java |
* @param index The index of the parameter value to set. |
346 |
* binary <code>InputStream</code> value. |
* @param value The value of the parameter. |
347 |
* |
* @exception SQLException If an error occurs. |
348 |
* @param index The index of the parameter value to set. |
*/ |
349 |
* @param value The value of the parameter. |
public void setBlob(int i, Blob x) throws SQLException; |
350 |
* @param length The number of bytes in the stream. |
|
351 |
* |
/** |
352 |
* @exception SQLException If an error occurs. |
* This method sets the specified parameter from the given Java |
353 |
*/ |
* <code>Clob</code> value. The default object type to SQL type mapping |
354 |
public abstract void |
* will be used. |
355 |
setBinaryStream(int index, InputStream value, int length) throws SQLException; |
* |
356 |
|
* @param index The index of the parameter value to set. |
357 |
/*************************************************************************/ |
* @param value The value of the parameter. |
358 |
|
* @exception SQLException If an error occurs. |
359 |
/** |
*/ |
360 |
* This method sets the specified parameter from the given Java |
public void setClob(int i, Clob x) throws SQLException; |
361 |
* character <code>Reader</code> value. |
|
362 |
* |
/** |
363 |
* @param index The index of the parameter value to set. |
* This method sets the specified parameter from the given Java |
364 |
* @param value The value of the parameter. |
* <code>Array</code> value. The default object type to SQL type mapping |
365 |
* @param length The number of bytes in the stream. |
* will be used. |
366 |
* |
* |
367 |
* @exception SQLException If an error occurs. |
* @param index The index of the parameter value to set. |
368 |
*/ |
* @param value The value of the parameter. |
369 |
public abstract void |
* @exception SQLException If an error occurs. |
370 |
setCharacterStream(int index, Reader value, int length) throws SQLException; |
*/ |
371 |
|
public void setArray(int i, Array x) throws SQLException; |
372 |
/*************************************************************************/ |
|
373 |
|
/** |
374 |
/** |
* This method returns meta data for the result set from this statement. |
375 |
* This method sets the specified parameter from the given Java |
* |
376 |
* <code>Ref</code> value. The default object type to SQL type mapping |
* @return Meta data for the result set from this statement. |
377 |
* will be used. |
* @exception SQLException If an error occurs. |
378 |
* |
*/ |
379 |
* @param index The index of the parameter value to set. |
public ResultSetMetaData getMetaData() throws SQLException; |
380 |
* @param value The value of the parameter. |
|
381 |
* |
/** |
382 |
* @exception SQLException If an error occurs. |
* This method sets the specified parameter from the given Java |
383 |
*/ |
* <code>java.sql.Date</code> value. |
384 |
public abstract void |
* |
385 |
setRef(int index, Ref value) throws SQLException; |
* @param index The index of the parameter value to set. |
386 |
|
* @param value The value of the parameter. |
387 |
/*************************************************************************/ |
* @param calendar The <code>Calendar</code> to use for timezone and locale. |
388 |
|
* @exception SQLException If an error occurs. |
389 |
/** |
*/ |
390 |
* This method sets the specified parameter from the given Java |
public void setDate(int parameterIndex, Date x, Calendar cal) |
391 |
* <code>Blob</code> value. The default object type to SQL type mapping |
throws SQLException; |
392 |
* will be used. |
|
393 |
* |
/** |
394 |
* @param index The index of the parameter value to set. |
* This method sets the specified parameter from the given Java |
395 |
* @param value The value of the parameter. |
* <code>java.sql.Time</code> value. |
396 |
* |
* |
397 |
* @exception SQLException If an error occurs. |
* @param index The index of the parameter value to set. |
398 |
*/ |
* @param value The value of the parameter. |
399 |
public abstract void |
* @param calendar The <code>Calendar</code> to use for timezone and locale. |
400 |
setBlob(int index, Blob value) throws SQLException; |
* @exception SQLException If an error occurs. |
401 |
|
*/ |
402 |
/*************************************************************************/ |
public void setTime(int parameterIndex, Time x, Calendar cal) |
403 |
|
throws SQLException; |
404 |
/** |
|
405 |
* This method sets the specified parameter from the given Java |
/** |
406 |
* <code>Clob</code> value. The default object type to SQL type mapping |
* This method sets the specified parameter from the given Java |
407 |
* will be used. |
* <code>java.sql.Timestamp</code> value. |
408 |
* |
* |
409 |
* @param index The index of the parameter value to set. |
* @param index The index of the parameter value to set. |
410 |
* @param value The value of the parameter. |
* @param value The value of the parameter. |
411 |
* |
* @param calendar The <code>Calendar</code> to use for timezone and locale. |
412 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
413 |
*/ |
*/ |
414 |
public abstract void |
public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) |
415 |
setClob(int index, Clob value) throws SQLException; |
throws SQLException; |
416 |
|
|
417 |
/*************************************************************************/ |
/** |
418 |
|
* This method populates the specified parameter with a SQL NULL value |
419 |
/** |
* for the specified type. |
420 |
* This method sets the specified parameter from the given Java |
* |
421 |
* <code>Array</code> value. The default object type to SQL type mapping |
* @param index The index of the parameter to set. |
422 |
* will be used. |
* @param type The SQL type identifier of the parameter from <code>Types</code> |
423 |
* |
* @param name The name of the data type, for user defined types. |
424 |
* @param index The index of the parameter value to set. |
* @exception SQLException If an error occurs. |
425 |
* @param value The value of the parameter. |
*/ |
426 |
* |
public void setNull(int paramIndex, int sqlType, String typeName) |
427 |
* @exception SQLException If an error occurs. |
throws SQLException; |
428 |
*/ |
|
429 |
public abstract void |
/** |
430 |
setArray(int index, Array value) throws SQLException; |
* @since 1.4 |
431 |
|
*/ |
432 |
/*************************************************************************/ |
public void setURL(int parameterIndex, URL x) throws SQLException; |
433 |
|
|
434 |
/** |
/** |
435 |
* This method sets the specified parameter from the given Java |
* @since 1.4 |
436 |
* <code>Object</code> value. The default object type to SQL type mapping |
*/ |
437 |
* will be used. |
public ParameterMetaData getParameterMetaData() throws SQLException; |
438 |
* |
} |
|
* @param index The index of the parameter value to set. |
|
|
* @param value The value of the parameter. |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
*/ |
|
|
public abstract void |
|
|
setObject(int index, Object value) throws SQLException; |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method sets the specified parameter from the given Java |
|
|
* <code>Object</code> value. The specified SQL object type will be used. |
|
|
* |
|
|
* @param index The index of the parameter value to set. |
|
|
* @param value The value of the parameter. |
|
|
* @param type The SQL type to use for the parameter, from <code>Types</code> |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
* |
|
|
* @see Types |
|
|
*/ |
|
|
public abstract void |
|
|
setObject(int index, Object value, int type) throws SQLException; |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method sets the specified parameter from the given Java |
|
|
* <code>Object</code> value. The specified SQL object type will be used. |
|
|
* |
|
|
* @param index The index of the parameter value to set. |
|
|
* @param value The value of the parameter. |
|
|
* @param type The SQL type to use for the parameter, from <code>Types</code> |
|
|
* @param scale The scale of the value, for numeric values only. |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
* |
|
|
* @see Types |
|
|
*/ |
|
|
public abstract void |
|
|
setObject(int index, Object value, int type, int scale) throws SQLException; |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method adds a set of parameters to the batch for JDBC 2.0. |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
*/ |
|
|
public abstract void |
|
|
addBatch() throws SQLException; |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method clears all of the input parameter that have been |
|
|
* set on this statement. |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
*/ |
|
|
public abstract void |
|
|
clearParameters() throws SQLException; |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method returns meta data for the result set from this statement. |
|
|
* |
|
|
* @return Meta data for the result set from this statement. |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
*/ |
|
|
public abstract ResultSetMetaData |
|
|
getMetaData() throws SQLException; |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method executes a prepared SQL query. |
|
|
* Some prepared statements return multiple results; the execute method |
|
|
* handles these complex statements as well as the simpler form of |
|
|
* statements handled by executeQuery and executeUpdate. |
|
|
* |
|
|
* @return The result of the SQL statement. |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
*/ |
|
|
public abstract boolean |
|
|
execute() throws SQLException; |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method executes a prepared SQL query and returns its ResultSet. |
|
|
* |
|
|
* @return The ResultSet of the SQL statement. |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
*/ |
|
|
public abstract ResultSet |
|
|
executeQuery() throws SQLException; |
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/** |
|
|
* This method executes an SQL INSERT, UPDATE or DELETE statement. SQL |
|
|
* statements that return nothing such as SQL DDL statements can be executed. |
|
|
* |
|
|
* @return The result is either the row count for INSERT, UPDATE or DELETE |
|
|
* statements; or 0 for SQL statements that return nothing. |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
*/ |
|
|
public abstract int |
|
|
executeUpdate() throws SQLException; |
|
|
|
|
|
} // interface PreparedStatement |
|
|
|
|