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)
Enables or disables rollback handling
|
appendRollbackHandler, closeConnection, commit, createCommand, createUtils, executeDelete, executeInsert, executeInsertInto, executeSQL, executeUpdate, getConnection, getUtils, removeRollbackHandler, rollback, setUtilspublic DBContextStatic(DBMSHandler dbmsHandler, Connection conn)
dbmsHandler - the database handlerconn - a database connectionpublic DBContextStatic(DBMSHandler dbmsHandler, Connection conn, boolean closeOnDiscard)
dbmsHandler - the database handlerconn - a database connectioncloseOnDiscard - flag whether to close the connection when calling discard()public DBMSHandler getDbms()
public boolean isPreparedStatementsEnabled()
DBContextBaseisPreparedStatementsEnabled in class DBContextBasepublic DBContextStatic setPreparedStatementsEnabled(boolean enabled)
enabled - flag whether to enable prepared statementspublic boolean isRollbackHandlingEnabled()
public DBContextStatic setRollbackHandlingEnabled(boolean enabled)
enabled - flag whether to enable rollback handlingpublic 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–2023 Apache Software Foundation. All rights reserved.