java.lang.Object
java.lang.Record
org.firebirdsql.jdbc.FBSavepoint
- Record Components:
savepointId
- numeric savepoint id (must be non-null
ifname
isnull
).name
- savepoint name (must be non-null
ifsavepointId
isnull
)
- All Implemented Interfaces:
Savepoint
,FirebirdSavepoint
@InternalApi
public record FBSavepoint(Integer savepointId, String name)
extends Record
implements FirebirdSavepoint
Savepoint implementation.
This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.
For the public API, refer to the Savepoint
and FirebirdSavepoint
interfaces.
- Author:
- Roman Rokytskyy, Mark Rotteveel
-
Constructor Summary
ConstructorsConstructorDescriptionFBSavepoint
(int savepointId) Create an unnamed savepoint.FBSavepoint
(Integer savepointId, String name) Creates an instance of aFBSavepoint
record class.FBSavepoint
(String name) Create a named savepoint. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.Returns the value of thesavepointId
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
FBSavepoint
Creates an instance of aFBSavepoint
record class.- Parameters:
savepointId
- the value for thesavepointId
record componentname
- the value for thename
record component
-
FBSavepoint
public FBSavepoint(int savepointId) Create an unnamed savepoint.- Parameters:
savepointId
- ID of the savepoint
-
FBSavepoint
Create a named savepoint.- Parameters:
name
- name of the savepoint
-
-
Method Details
-
getSavepointId
- Specified by:
getSavepointId
in interfaceSavepoint
- Throws:
SQLException
-
getSavepointName
- Specified by:
getSavepointName
in interfaceSavepoint
- Throws:
SQLException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
savepointId
Returns the value of thesavepointId
record component.- Returns:
- the value of the
savepointId
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-