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 52 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 | |
void | executeBlobUpdate (String queryPattern, String parameters[], byte[][] blobs) throws DatabaseException |
execute insert or update query with Blob data. | |
ResultSet | executeQuery (String queryPattern, String parameters[]) throws DatabaseException |
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) throws DatabaseException |
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 DatabaseException |
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 DatabaseException |
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[]) throws DatabaseException |
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 290 of file AbstractQueryManager.java. References org.openmobileis.common.util.database.AbstractQueryManager.Separator. |
|
close() allows to close the database
Definition at line 87 of file AbstractQueryManager.java. |
|
execute insert or update query with Blob data. Query parameters are indicated with 0% tag and blob data with ? tag. Use SQL syntax to perform queries
Definition at line 104 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 172 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 232 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 200 of file AbstractQueryManager.java. |
|
Returns the dbManager.
Reimplemented in org.openmobileis.examples.mycrm.data.jdbc.MyCrmTerminalUserlQuery. Definition at line 361 of file AbstractQueryManager.java. References org.openmobileis.common.util.database.ManagerDB.getManager(). Referenced by org.openmobileis.examples.mycrm.data.jdbc.MyCrmJDBCUserFactory.authenticateUser(), org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.deleteProperty(), org.openmobileis.examples.mycrm.data.jdbc.MyCrmLabelSynchroTarget.getAllCollectionObject(), org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.getAllGlobalProperties(), org.openmobileis.synchro.algo.replication.utils.DefaultSynchroAtomicObjectDelegate.getAllModifiedAtomicObjectForServiceSince(), org.openmobileis.synchro.algo.replication.utils.DefaultSynchroAtomicObjectDelegate.getAtomicObject(), org.openmobileis.examples.mycrm.data.jdbc.MyCrmLabelSynchroTarget.getCollectionObjectWithId(), org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.getPropertiesForService(), org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.getProperty(), org.openmobileis.examples.mycrm.data.jdbc.MyCrmJDBCUserFactory.getUser(), org.openmobileis.modules.crm.database.common.jdbc.JDBCGlobalPropertyFactory.storeProperty(), and org.openmobileis.examples.server.synchro.BaseDataFODBSyncTarget.updateCollectionObject(). |