public class DBSession extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.pool.impl.GenericObjectPool<DBSession> |
connectionPool |
static String |
drivers |
static String |
entireUrl |
| Modifier | Constructor and Description |
|---|---|
protected |
DBSession(Connection conn) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeConnection() |
void |
commit() |
static DBSession |
connect() |
void |
disableAutoCommit() |
ResultSet |
execute(String query,
boolean resultSetReuse) |
int |
executeUpdate(String query) |
Connection |
getConnection() |
DatabaseMetaData |
getDBMetadata() |
static <QUERY> QUERY |
getImplementation(Class<QUERY> type) |
PreparedStatement |
getPreparedStatement(String sql) |
static void |
initialize(String basePackage,
String username,
String passwd,
String dbPath) |
static void |
initialize(String basePackage,
String username,
String passwd,
String dbPath,
int maxActiveConnections) |
boolean |
isConnectionClosed() |
void |
release() |
void |
rollback() |
protected static org.apache.commons.pool.impl.GenericObjectPool<DBSession> connectionPool
public static String drivers
public static String entireUrl
protected DBSession(Connection conn)
public static void initialize(String basePackage, String username, String passwd, String dbPath) throws Exception
Exceptionpublic static void initialize(String basePackage, String username, String passwd, String dbPath, int maxActiveConnections) throws Exception
Exceptionpublic void release()
public ResultSet execute(String query, boolean resultSetReuse) throws SQLException
SQLExceptionpublic int executeUpdate(String query) throws SQLException
SQLExceptionpublic PreparedStatement getPreparedStatement(String sql) throws SQLException
SQLExceptionpublic static <QUERY> QUERY getImplementation(Class<QUERY> type) throws Exception
Exceptionpublic DatabaseMetaData getDBMetadata() throws Exception
Exceptionpublic Connection getConnection()
Copyright © 2015. All Rights Reserved.