Package rife.database

Class DbQueryManager

java.lang.Object
rife.database.DbQueryManager
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AbstractGenericQueryManager, DatabaseContent, DatabaseContentStore, DatabaseRawStore, DatabaseRemember, DatabaseResources, DatabaseScheduling, DatabaseSessions, DatabaseSessionValidator, DatabaseTaskOptions, DatabaseTasks, DatabaseUsers

public class DbQueryManager extends Object implements Cloneable
This is a convenience class to make it easy to control the queries that handle the retrieval, storage, update and removal of data in a database. All queries will be executed in a connection of the Datasource that's provided to the constructor of the DbQueryManager.

A collection of convenience methods have been provided to quickly execute queries in a variety of manners without having to worry about the logic behind it or having to remember to close the queries at the appropriate moment. These methods optionally interact with the DbPreparedStatementHandler and DbResultSetHandler classes to make it possible to fully customize the executed queries. The following categories of worry-free methods exist:

Lower-level methods are also available for the sake of repetitive code-reduction. To obtain execute regular statements directly, use the executeQuery method.

Finally, since DbStatement and DbPreparedStatement instances preserve a reference to their result set, it's easy to iterate over the rows of a result set with the fetch or fetchAll methods.

Since:
1.0
See Also: