Top Description Fields Constructors Methods
org.hsqldb.jdbc

public Class JDBCSavepoint

extends Object
implements Savepoint
Class Inheritance
All Implemented Interfaces
java.sql.Savepoint
Imports
java.sql.SQLException, .Savepoint

The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method. When a transaction is rolled back to a savepoint all changes made after that savepoint are undone.

Savepoints can be either named or unnamed. Unnamed savepoints are identified by an ID generated by the underlying data source.

HSQLDB-Specific Information:

SQL 2003 standard does not support unnamed savepoints. However, this feature is supported from version 2.0.

If the connection is autoCommit, setting savepoints has no effect as any such savepoint is cleared upon the execution of the first transactional statement.

Author
Campbell Burnet (campbell-burnet@users dot sourceforge.net)
Since
JDK 1.4, HSQLDB 1.7.2

Field Summary

Modifier and TypeField and Description
pack-priv JDBCConnection
pack-priv int
pack-priv String

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the numeric ID of this savepoint
getSavepointId
()

Implements java.sql.Savepoint.getSavepointId.

Retrieves the generated ID for the savepoint that this Savepoint object represents.

public String

Returns:

the name of this savepoint
getSavepointName
()

Implements java.sql.Savepoint.getSavepointName.

Retrieves the name of the savepoint that this Savepoint object represents.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

connectionback to summary
pack-priv JDBCConnection connection
idback to summary
pack-priv int id
nameback to summary
pack-priv String name

Constructor Detail

JDBCSavepointback to summary
pack-priv JDBCSavepoint(String name, JDBCConnection conn) throws SQLException
JDBCSavepointback to summary
pack-priv JDBCSavepoint(JDBCConnection conn) throws SQLException

Method Detail

getSavepointIdback to summary
public int getSavepointId() throws SQLException

Implements java.sql.Savepoint.getSavepointId.

Retrieves the generated ID for the savepoint that this Savepoint object represents.

Returns:int

the numeric ID of this savepoint

Exceptions
SQLException:
if this is a named savepoint
Since
1.4
getSavepointNameback to summary
public String getSavepointName() throws SQLException

Implements java.sql.Savepoint.getSavepointName.

Retrieves the name of the savepoint that this Savepoint object represents.

Returns:String

the name of this savepoint

Exceptions
SQLException:
if this is an un-named savepoint
Since
1.4
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.