/[classpath]/classpath/java/sql/Connection.java
ViewVC logotype

Diff of /classpath/java/sql/Connection.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by bryce, Fri Jun 21 05:34:12 2002 UTC revision 1.7 by mkoch, Sun Oct 12 16:38:16 2003 UTC
# Line 51  public interface Connection Line 51  public interface Connection
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
# Line 66  public interface Connection Line 66  public interface Connection
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
# Line 74  public interface Connection Line 74  public interface Connection
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
# Line 84  public interface Connection Line 84  public interface Connection
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
# Line 94  public interface Connection Line 94  public interface Connection
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
# Line 107  public interface Connection Line 107  public interface Connection
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
# Line 121  public interface Connection Line 121  public interface Connection
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
# Line 131  public interface Connection Line 131  public interface Connection
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,
# Line 144  public interface Connection Line 144  public interface Connection
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.
# Line 159  public interface Connection Line 159  public interface Connection
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
# Line 167  public interface Connection Line 167  public interface Connection
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
# Line 175  public interface Connection Line 175  public interface 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.
# Line 191  public interface Connection Line 191  public interface Connection
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.
# Line 200  public interface Connection Line 200  public interface 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
# Line 210  public interface Connection Line 210  public interface Connection
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.
# Line 219  public interface Connection Line 219  public interface Connection
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.
# Line 229  public interface Connection Line 229  public interface 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,
# Line 239  public interface Connection Line 239  public interface 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
# Line 248  public interface Connection Line 248  public interface Connection
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
# Line 257  public interface Connection Line 257  public interface Connection
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,
# Line 268  public interface Connection Line 268  public interface 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
# Line 290  public interface Connection Line 290  public interface Connection
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    /**    /**
# Line 310  public interface Connection Line 310  public interface Connection
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    /**    /**
# Line 330  public interface Connection Line 330  public interface Connection
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    /**    /**
# Line 341  public interface Connection Line 341  public interface Connection
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.
# Line 350  public interface Connection Line 350  public interface Connection
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  }  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26