org.firebirdsql.jdbc

Class AbstractSavepoint

Implemented Interfaces:
FirebirdSavepoint

public abstract class AbstractSavepoint
extends java.lang.Object
implements FirebirdSavepoint

Implementation of the FirebirdSavepoint interface. Subclasses might additionally implement java.sql.Savepoint interface.

Field Summary

static String
SAVEPOINT_ID_PREFIX

Constructor Summary

AbstractSavepoint(String name)
Create instance of this class for the specified name.
AbstractSavepoint(int id)
Create instance of this class.

Method Summary

boolean
equals(Object obj)
Check if objects are equal.
int
getSavepointId()
Get ID of the savepoint.
String
getSavepointName()
Get name of the savepoint.
int
hashCode()
Get hash code of this instance.

Field Details

SAVEPOINT_ID_PREFIX

public static final String SAVEPOINT_ID_PREFIX

Constructor Details

AbstractSavepoint

public AbstractSavepoint(String name)
Create instance of this class for the specified name.
Parameters:
name - name of the savepoint.

AbstractSavepoint

public AbstractSavepoint(int id)
Create instance of this class.
Parameters:
id - ID of the savepoint.

Method Details

equals

public boolean equals(Object obj)
Check if objects are equal. For unnamed savepoints their IDs are checked, otherwise their names.
Parameters:
obj - object to test.
Returns:
true if obj is equal to this object.

getSavepointId

public int getSavepointId()
            throws SQLException
Get ID of the savepoint.
Specified by:
getSavepointId in interface FirebirdSavepoint

getSavepointName

public String getSavepointName()
            throws SQLException
Get name of the savepoint.
Specified by:
getSavepointName in interface FirebirdSavepoint

hashCode

public int hashCode()
Get hash code of this instance.

Copyright B) 2001 David Jencks and other authors. All rights reserved.