51 |
* This transaction isolation level indicates that transactions are not |
* This transaction isolation level indicates that transactions are not |
52 |
* supported. |
* supported. |
53 |
*/ |
*/ |
54 |
public static final int TRANSACTION_NONE = 0; |
int TRANSACTION_NONE = 0; |
55 |
|
|
56 |
/** |
/** |
57 |
* This transaction isolation level indicates that one transaction can |
* This transaction isolation level indicates that one transaction can |
58 |
* read modifications by other transactions before the other transactions |
* read modifications by other transactions before the other transactions |
59 |
* have committed their changes. This could result in invalid reads. |
* have committed their changes. This could result in invalid reads. |
60 |
*/ |
*/ |
61 |
public static final int TRANSACTION_READ_UNCOMMITTED = 1; |
int TRANSACTION_READ_UNCOMMITTED = 1; |
62 |
|
|
63 |
/** |
/** |
64 |
* This transaction isolation leve indicates that only committed data from |
* This transaction isolation leve indicates that only committed data from |
66 |
* another transaction commits a change to that row, the first transaction |
* another transaction commits a change to that row, the first transaction |
67 |
* would retrieve the changed row on subsequent reads of the same row. |
* would retrieve the changed row on subsequent reads of the same row. |
68 |
*/ |
*/ |
69 |
public static final int TRANSACTION_READ_COMMITTED = 2; |
int TRANSACTION_READ_COMMITTED = 2; |
70 |
|
|
71 |
/** |
/** |
72 |
* This transaction isolation level indicates that only committed data from |
* This transaction isolation level indicates that only committed data from |
74 |
* a row will not be different on a subsequent read even if another |
* a row will not be different on a subsequent read even if another |
75 |
* transaction commits a change. |
* transaction commits a change. |
76 |
*/ |
*/ |
77 |
public static final int TRANSACTION_REPEATABLE_READ = 4; |
int TRANSACTION_REPEATABLE_READ = 4; |
78 |
|
|
79 |
/** |
/** |
80 |
* This transaction isolation level indicates that only committed data from |
* This transaction isolation level indicates that only committed data from |
84 |
* transactions will not affect the result set returned during subsequent |
* transactions will not affect the result set returned during subsequent |
85 |
* executions of the same WHERE clause in this transaction. |
* executions of the same WHERE clause in this transaction. |
86 |
*/ |
*/ |
87 |
public static final int TRANSACTION_SERIALIZABLE = 8; |
int TRANSACTION_SERIALIZABLE = 8; |
88 |
|
|
89 |
/** |
/** |
90 |
* This method creates a new SQL statement. The default result set type |
* This method creates a new SQL statement. The default result set type |
94 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
95 |
* @see Statement |
* @see Statement |
96 |
*/ |
*/ |
97 |
public Statement createStatement() throws SQLException; |
Statement createStatement() throws SQLException; |
98 |
|
|
99 |
/** |
/** |
100 |
* This method creates a new <code>PreparedStatement</code> for the specified |
* This method creates a new <code>PreparedStatement</code> for the specified |
107 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
108 |
* @see PreparedStatement |
* @see PreparedStatement |
109 |
*/ |
*/ |
110 |
public PreparedStatement prepareStatement(String sql) throws SQLException; |
PreparedStatement prepareStatement(String sql) throws SQLException; |
111 |
|
|
112 |
/** |
/** |
113 |
* This method creates a new <code>CallableStatement</code> for the |
* This method creates a new <code>CallableStatement</code> for the |
121 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
122 |
* @see CallableStatement |
* @see CallableStatement |
123 |
*/ |
*/ |
124 |
public CallableStatement prepareCall(String sql) throws SQLException; |
CallableStatement prepareCall(String sql) throws SQLException; |
125 |
|
|
126 |
/** |
/** |
127 |
* This method converts the specified generic SQL statement into the |
* This method converts the specified generic SQL statement into the |
131 |
* @return The native SQL statement. |
* @return The native SQL statement. |
132 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
133 |
*/ |
*/ |
134 |
public String nativeSQL(String sql) throws SQLException; |
String nativeSQL(String sql) throws SQLException; |
135 |
|
|
136 |
/** |
/** |
137 |
* This method turns auto commit mode on or off. In auto commit mode, |
* This method turns auto commit mode on or off. In auto commit mode, |
144 |
* @see commit |
* @see commit |
145 |
* @see rollback |
* @see rollback |
146 |
*/ |
*/ |
147 |
public void setAutoCommit(boolean autoCommit) throws SQLException; |
void setAutoCommit(boolean autoCommit) throws SQLException; |
148 |
|
|
149 |
/** |
/** |
150 |
* This method tests whether or not auto commit mode is currently enabled. |
* This method tests whether or not auto commit mode is currently enabled. |
159 |
* @see commit |
* @see commit |
160 |
* @see rollback |
* @see rollback |
161 |
*/ |
*/ |
162 |
public boolean getAutoCommit() throws SQLException; |
boolean getAutoCommit() throws SQLException; |
163 |
|
|
164 |
/** |
/** |
165 |
* This method commits any SQL statements executed on this connection since |
* This method commits any SQL statements executed on this connection since |
167 |
* |
* |
168 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
169 |
*/ |
*/ |
170 |
public void commit() throws SQLException; |
void commit() throws SQLException; |
171 |
|
|
172 |
/** |
/** |
173 |
* This method rolls back any SQL statements executed on this connection |
* This method rolls back any SQL statements executed on this connection |
175 |
* |
* |
176 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
177 |
*/ |
*/ |
178 |
public void rollback() throws SQLException; |
void rollback() throws SQLException; |
179 |
|
|
180 |
/** |
/** |
181 |
* This method immediately closes this database connection. |
* This method immediately closes this database connection. |
182 |
* |
* |
183 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
184 |
*/ |
*/ |
185 |
public void close() throws SQLException; |
void close() throws SQLException; |
186 |
|
|
187 |
/** |
/** |
188 |
* This method tests whether or not this connection has been closed. |
* This method tests whether or not this connection has been closed. |
191 |
* otherwise. |
* otherwise. |
192 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
193 |
*/ |
*/ |
194 |
public boolean isClosed() throws SQLException; |
boolean isClosed() throws SQLException; |
195 |
|
|
196 |
/** |
/** |
197 |
* This method returns the meta data for this database connection. |
* This method returns the meta data for this database connection. |
200 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
201 |
* @see DatabaseMetaData |
* @see DatabaseMetaData |
202 |
*/ |
*/ |
203 |
public DatabaseMetaData getMetaData() throws SQLException; |
DatabaseMetaData getMetaData() throws SQLException; |
204 |
|
|
205 |
/** |
/** |
206 |
* This method turns read only mode on or off. It may not be called while |
* This method turns read only mode on or off. It may not be called while |
210 |
* <code>false</code> otherwise. |
* <code>false</code> otherwise. |
211 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
212 |
*/ |
*/ |
213 |
public void setReadOnly(boolean readOnly) throws SQLException; |
void setReadOnly(boolean readOnly) throws SQLException; |
214 |
|
|
215 |
/** |
/** |
216 |
* This method tests whether or not this connection is in read only mode. |
* This method tests whether or not this connection is in read only mode. |
219 |
* otherwise. |
* otherwise. |
220 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
221 |
*/ |
*/ |
222 |
public boolean isReadOnly() throws SQLException; |
boolean isReadOnly() throws SQLException; |
223 |
|
|
224 |
/** |
/** |
225 |
* This method sets the name of the catalog in use by this connection. |
* This method sets the name of the catalog in use by this connection. |
229 |
* @param catalog The name of the catalog to use for this connection. |
* @param catalog The name of the catalog to use for this connection. |
230 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
231 |
*/ |
*/ |
232 |
public void setCatalog(String catalog) throws SQLException; |
void setCatalog(String catalog) throws SQLException; |
233 |
|
|
234 |
/** |
/** |
235 |
* This method returns the name of the catalog in use by this connection, |
* This method returns the name of the catalog in use by this connection, |
239 |
* exist or catalogs are not supported by this database. |
* exist or catalogs are not supported by this database. |
240 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
241 |
*/ |
*/ |
242 |
public String getCatalog() throws SQLException; |
String getCatalog() throws SQLException; |
243 |
|
|
244 |
/** |
/** |
245 |
* This method sets the current transaction isolation mode. This must |
* This method sets the current transaction isolation mode. This must |
248 |
* @param level The transaction isolation level. |
* @param level The transaction isolation level. |
249 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
250 |
*/ |
*/ |
251 |
public void setTransactionIsolation(int level) throws SQLException; |
void setTransactionIsolation(int level) throws SQLException; |
252 |
|
|
253 |
/** |
/** |
254 |
* This method returns the current transaction isolation mode. This will |
* This method returns the current transaction isolation mode. This will |
257 |
* @return The transaction isolation level. |
* @return The transaction isolation level. |
258 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
259 |
*/ |
*/ |
260 |
public int getTransactionIsolation() throws SQLException; |
int getTransactionIsolation() throws SQLException; |
261 |
|
|
262 |
/** |
/** |
263 |
* This method returns the first warning that occurred on this connection, |
* This method returns the first warning that occurred on this connection, |
268 |
* <code>null</code> if there have been no warnings. |
* <code>null</code> if there have been no warnings. |
269 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
270 |
*/ |
*/ |
271 |
public SQLWarning getWarnings() throws SQLException; |
SQLWarning getWarnings() throws SQLException; |
272 |
|
|
273 |
/** |
/** |
274 |
* This method clears all warnings that have occurred on this connection. |
* This method clears all warnings that have occurred on this connection. |
275 |
* |
* |
276 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
277 |
*/ |
*/ |
278 |
public void clearWarnings() throws SQLException; |
void clearWarnings() throws SQLException; |
279 |
|
|
280 |
/** |
/** |
281 |
* This method creates a new SQL statement with the specified type and |
* This method creates a new SQL statement with the specified type and |
290 |
* @see Statement |
* @see Statement |
291 |
* @see ResultSet |
* @see ResultSet |
292 |
*/ |
*/ |
293 |
public Statement createStatement(int resultSetType, int resultSetConcurrency) |
Statement createStatement(int resultSetType, int resultSetConcurrency) |
294 |
throws SQLException; |
throws SQLException; |
295 |
|
|
296 |
/** |
/** |
310 |
* @see PreparedStatement |
* @see PreparedStatement |
311 |
* @see ResultSet |
* @see ResultSet |
312 |
*/ |
*/ |
313 |
public PreparedStatement prepareStatement(String sql, int resultSetType, |
PreparedStatement prepareStatement(String sql, int resultSetType, |
314 |
int resultSetConcurrency) throws SQLException; |
int resultSetConcurrency) throws SQLException; |
315 |
|
|
316 |
/** |
/** |
330 |
* @see CallableStatement |
* @see CallableStatement |
331 |
* @see ResultSet |
* @see ResultSet |
332 |
*/ |
*/ |
333 |
public CallableStatement prepareCall(String sql, int resultSetType, int |
CallableStatement prepareCall(String sql, int resultSetType, int |
334 |
resultSetConcurrency) throws SQLException; |
resultSetConcurrency) throws SQLException; |
335 |
|
|
336 |
/** |
/** |
341 |
* @return The SQL type to Java class mapping. |
* @return The SQL type to Java class mapping. |
342 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
343 |
*/ |
*/ |
344 |
public Map getTypeMap() throws SQLException; |
Map getTypeMap() throws SQLException; |
345 |
|
|
346 |
/** |
/** |
347 |
* This method sets the mapping table for SQL types to Java classes. |
* This method sets the mapping table for SQL types to Java classes. |
350 |
* @param map The new SQL mapping table. |
* @param map The new SQL mapping table. |
351 |
* @exception SQLException If an error occurs. |
* @exception SQLException If an error occurs. |
352 |
*/ |
*/ |
353 |
public void setTypeMap(Map map) throws SQLException; |
void setTypeMap(Map map) throws SQLException; |
354 |
|
|
355 |
/** |
/** |
356 |
* @since 1.4 |
* @since 1.4 |
357 |
*/ |
*/ |
358 |
public void setHoldability(int holdability) throws SQLException; |
void setHoldability(int holdability) throws SQLException; |
359 |
|
|
360 |
/** |
/** |
361 |
* @since 1.4 |
* @since 1.4 |
362 |
*/ |
*/ |
363 |
public int getHoldability() throws SQLException; |
int getHoldability() throws SQLException; |
364 |
|
|
365 |
/** |
/** |
366 |
* @since 1.4 |
* @since 1.4 |
367 |
*/ |
*/ |
368 |
public Savepoint setSavepoint() throws SQLException; |
Savepoint setSavepoint() throws SQLException; |
369 |
|
|
370 |
/** |
/** |
371 |
* @since 1.4 |
* @since 1.4 |
372 |
*/ |
*/ |
373 |
public Savepoint setSavepoint(String name) throws SQLException; |
Savepoint setSavepoint(String name) throws SQLException; |
374 |
|
|
375 |
/** |
/** |
376 |
* @since 1.4 |
* @since 1.4 |
377 |
*/ |
*/ |
378 |
public void rollback(Savepoint savepoint) throws SQLException; |
void rollback(Savepoint savepoint) throws SQLException; |
379 |
|
|
380 |
/** |
/** |
381 |
* @since 1.4 |
* @since 1.4 |
382 |
*/ |
*/ |
383 |
public void releaseSavepoint(Savepoint savepoint) throws SQLException; |
void releaseSavepoint(Savepoint savepoint) throws SQLException; |
384 |
|
|
385 |
/** |
/** |
386 |
* @since 1.4 |
* @since 1.4 |
387 |
*/ |
*/ |
388 |
public Statement createStatement(int resultSetType, int |
Statement createStatement(int resultSetType, int |
389 |
resultSetConcurrency, int resultSetHoldability) throws SQLException; |
resultSetConcurrency, int resultSetHoldability) throws SQLException; |
390 |
|
|
391 |
/** |
/** |
392 |
* @since 1.4 |
* @since 1.4 |
393 |
*/ |
*/ |
394 |
public PreparedStatement prepareStatement(String sql, int resultSetType, int |
PreparedStatement prepareStatement(String sql, int resultSetType, int |
395 |
resultSetConcurrency, int resultSetHoldability) throws SQLException; |
resultSetConcurrency, int resultSetHoldability) throws SQLException; |
396 |
|
|
397 |
/** |
/** |
398 |
* @since 1.4 |
* @since 1.4 |
399 |
*/ |
*/ |
400 |
public CallableStatement prepareCall(String sql, int resultSetType, int |
CallableStatement prepareCall(String sql, int resultSetType, int |
401 |
resultSetConcurrency, int resultSetHoldability) throws SQLException; |
resultSetConcurrency, int resultSetHoldability) throws SQLException; |
402 |
|
|
403 |
/** |
/** |
404 |
* @since 1.4 |
* @since 1.4 |
405 |
*/ |
*/ |
406 |
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) |
PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) |
407 |
throws SQLException; |
throws SQLException; |
408 |
|
|
409 |
/** |
/** |
410 |
* @since 1.4 |
* @since 1.4 |
411 |
*/ |
*/ |
412 |
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) |
PreparedStatement prepareStatement(String sql, int[] columnIndexes) |
413 |
throws SQLException; |
throws SQLException; |
414 |
|
|
415 |
/** |
/** |
416 |
* @since 1.4 |
* @since 1.4 |
417 |
*/ |
*/ |
418 |
public PreparedStatement prepareStatement(String sql, String[] columnNames) |
PreparedStatement prepareStatement(String sql, String[] columnNames) |
419 |
throws SQLException; |
throws SQLException; |
420 |
} |
} |