public class JdbcTransaction extends Object
| Constructor and Description |
|---|
JdbcTransaction(Connection connection)
Constructor
|
JdbcTransaction(Connection connection,
Savepoint savepoint)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Commits the transaction, thus the underlying connection
|
Connection |
getConnection()
Gets the connection of this transaction
|
boolean |
getRollbackOnly()
Whether the transaction is marked as rollback only or not
|
void |
rollBack()
Rollbacks the transaction, thus the underlying connection
|
void |
setRollbackOnly()
If the transaction is marked as rollback only
|
public JdbcTransaction(Connection connection)
connection - the jdbc connectionpublic JdbcTransaction(Connection connection, Savepoint savepoint)
connection - the jdbc connectionsavepoint - the savepointpublic void commit()
throws SQLException
SQLException - when db errorpublic void rollBack()
throws SQLException
SQLException - when db errorpublic void setRollbackOnly()
public boolean getRollbackOnly()
public Connection getConnection()
Copyright © 2013-2018–2019 SeedStack. All rights reserved.