KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > sql > Savepoint


1 /*
2  * @(#)Savepoint.java 1.9 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.sql;
9  
10 /**
11  * The representation of a savepoint, which is a point within
12  * the current transaction that can be referenced from the
13  * <code>Connection.rollback</code> method. When a transaction
14  * is rolled back to a savepoint all changes made after that
15  * savepoint are undone.
16  * <p>
17  * Savepoints can be either named or unnamed. Unnamed savepoints
18  * are identified by an ID generated by the underlying data source.
19  *
20  * @since 1.4
21  */

22
23 public interface Savepoint {
24
25     /**
26      * Retrieves the generated ID for the savepoint that this
27      * <code>Savepoint</code> object represents.
28      * @return the numeric ID of this savepoint
29      * @exception SQLException if this is a named savepoint
30      * @since 1.4
31      */

32     int getSavepointId() throws SQLException JavaDoc;
33
34     /**
35      * Retrieves the name of the savepoint that this <code>Savepoint</code>
36      * object represents.
37      * @return the name of this savepoint
38      * @exception SQLException if this is an un-named savepoint
39      * @since 1.4
40      */

41     String JavaDoc getSavepointName() throws SQLException JavaDoc;
42 }
43
44
45
Popular Tags