public class DBContextStatic extends DBContextBase
| Constructor and Description |
|---|
DBContextStatic(DBMSHandler dbmsHandler,
Connection conn)
Creates a static DBContext with default options
|
DBContextStatic(DBMSHandler dbmsHandler,
Connection conn,
boolean closeOnDiscard)
Creates a static DBContext with custom options
|
| Modifier and Type | Method and Description |
|---|---|
void |
discard()
Discard connection releated ressources
WARING: No gurarantee it will be called
|
protected Connection |
getConnection(boolean create) |
DBMSHandler |
getDbms() |
protected DBRollbackManager |
getRollbackManager(boolean create) |
boolean |
isPreparedStatementsEnabled()
returns whether DBCommmand should automatically create a prepared statement with command params (?)
|
boolean |
isRollbackHandlingEnabled() |
DBContextStatic |
setPreparedStatementsEnabled(boolean enabled)
enables or disables the use of prepared statements for update and insert commands as well as for read operations on a DBRecord.
|
DBContextStatic |
setRollbackHandlingEnabled(boolean enabled) |
appendRollbackHandler, closeConnection, commit, createCommand, createUtils, executeDelete, executeInsert, executeInsertInto, executeSQL, executeUpdate, getConnection, getUtils, removeRollbackHandler, rollbackpublic DBContextStatic(DBMSHandler dbmsHandler, Connection conn)
dbmsHandler - conn - public DBContextStatic(DBMSHandler dbmsHandler, Connection conn, boolean closeOnDiscard)
dbmsHandler - conn - enableRollbackHandling - closeOnDiscard - public DBMSHandler getDbms()
public boolean isPreparedStatementsEnabled()
DBContextBaseisPreparedStatementsEnabled in class DBContextBasepublic DBContextStatic setPreparedStatementsEnabled(boolean enabled)
preparedStatementsEnabled - public boolean isRollbackHandlingEnabled()
public DBContextStatic setRollbackHandlingEnabled(boolean enabled)
public void discard()
DBContextBasediscard in interface DBContextdiscard in class DBContextBaseprotected Connection getConnection(boolean create)
getConnection in class DBContextBaseprotected DBRollbackManager getRollbackManager(boolean create)
getRollbackManager in class DBContextBaseCopyright © 2008–2022 Apache Software Foundation. All rights reserved.