Inheritance diagram for org.openmobileis.common.util.database.AbstractQueryManager:
A query is built with : A pattern : SQL query with variables Parameters : Values of the variables defined in the pattern For instance, the query "SELECT * FROM TABLE WHERE ROW1 = val1 AND ROW2 = val2 will have the following pattern : "SELECT * FROM TABLE WHERE ROW1 = 0% AND ROW2 = 1% and the following parameters : {"val1", "val2"}. Note that the name of the variables are a sequential number starting by 0 and inserted between two separators : % The Manager variable contains dbManager instance which provides services to be connected / disconnected to the database as well as a service to get a connection from the pool connection object.
Definition at line 57 of file AbstractQueryManager.java.
Public Member Functions | |
AbstractQueryManager () | |
void | registerManagerDB (ManagerDB manager) |
void | close () |
close() allows to close the database | |
ManagerDB | getDbManager () |
Returns the dbManager. | |
Protected Member Functions | |
ResultSet | executeQuery (String queryPattern, String parameters[]) |
executeQuery() allows to execute a query such as "SELECT * FROM TABLE") use SQL syntax to perform queries Connection is not close to keep the resulting resultset. | |
ResultSet | executeDynamicQuery (String queryPattern, java.util.Hashtable variables) |
executeQuery() allows to execute a query such as "SELECT * FROM TABLE") use SQL syntax to perform queries Connection is not close to keep the resulting resultset. | |
void | executeUpdate (String queryPattern, String parameters[]) throws ServiceException |
executeUpdateQuery() allows to execute a query with INSERT, UPDATE or DELETE statements use SQL syntax to perform queries | |
void | executeDynamicUpdate (String queryPattern, java.util.Hashtable variables) throws ServiceException |
executeUpdateQuery() allows to execute a query with INSERT, UPDATE or DELETE statements use SQL syntax to perform queries Connection is not close to keep the resulting resultset. | |
String | buildDynamicQuery (String pattern, java.util.Hashtable variables) |
String | buildQuery (String queryPattern, String parameters[]) |
buildQuery() get the query pattern stored in queries and insert the parameters. | |
String | makeSQLList (String[] items) |
Static Package Attributes | |
static char | Separator = '%' |
|
buildQuery() get the query pattern stored in queries and insert the parameters.
Definition at line 265 of file AbstractQueryManager.java. References org.openmobileis.common.util.database.AbstractQueryManager.Separator. |
|
close() allows to close the database
Definition at line 92 of file AbstractQueryManager.java. |
|
executeQuery() allows to execute a query such as "SELECT * FROM TABLE") use SQL syntax to perform queries Connection is not close to keep the resulting resultset. It must be garbaged by calling ManagerDB.getManager().garbageOpenedConnection();;
Definition at line 140 of file AbstractQueryManager.java. |
|
executeUpdateQuery() allows to execute a query with INSERT, UPDATE or DELETE statements use SQL syntax to perform queries Connection is not close to keep the resulting resultset. It must be garbaged by calling ManagerDB.getManager().garbageOpenedConnection();;
Definition at line 200 of file AbstractQueryManager.java. |
|
|
executeUpdateQuery() allows to execute a query with INSERT, UPDATE or DELETE statements use SQL syntax to perform queries Close and garbage the connection and pending result.
Definition at line 167 of file AbstractQueryManager.java. |
|
Returns the dbManager.
Definition at line 339 of file AbstractQueryManager.java. References org.openmobileis.common.util.database.ManagerDB.getManager(). Referenced by org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.deleteProperty(), org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.getAllGlobalProperties(), org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.getPropertiesForService(), org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.getProperty(), and org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.storeProperty(). |