Package nxt.db
Class TransactionalDb
- java.lang.Object
-
- nxt.db.BasicDb
-
- nxt.db.TransactionalDb
-
public class TransactionalDb extends BasicDb
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TransactionalDb.TransactionCallback
Transaction callback interface-
Nested classes/interfaces inherited from class nxt.db.BasicDb
BasicDb.DbProperties
-
-
Constructor Summary
Constructors Constructor Description TransactionalDb(BasicDb.DbProperties dbProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.Connection
beginTransaction()
void
clearCache()
void
commitTransaction()
void
endTransaction()
java.sql.Connection
getConnection()
boolean
isInTransaction()
void
registerCallback(TransactionalDb.TransactionCallback callback)
void
rollbackTransaction()
-
Methods inherited from class nxt.db.BasicDb
analyzeTables, getPooledConnection, getUrl, init, shutdown
-
-
-
-
Constructor Detail
-
TransactionalDb
public TransactionalDb(BasicDb.DbProperties dbProperties)
-
-
Method Detail
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
- Overrides:
getConnection
in classBasicDb
- Throws:
java.sql.SQLException
-
isInTransaction
public boolean isInTransaction()
-
beginTransaction
public java.sql.Connection beginTransaction()
-
commitTransaction
public void commitTransaction()
-
rollbackTransaction
public void rollbackTransaction()
-
endTransaction
public void endTransaction()
-
registerCallback
public void registerCallback(TransactionalDb.TransactionCallback callback)
-
clearCache
public void clearCache()
-
-