com.uwyn.rife.database
Class DbQueryManagerFactory

java.lang.Object
  extended by com.uwyn.rife.database.DbQueryManagerFactory
Direct Known Subclasses:
DatabaseContentFactory, DatabaseImageStoreFactory, DatabaseMailQueueFactory, DatabaseRawStoreFactory, DatabaseRememberFactory, DatabaseResourcesFactory, DatabaseSchedulerFactory, DatabaseSessionsFactory, DatabaseSessionValidatorFactory, DatabaseTaskoptionsFactory, DatabaseTasksFactory, DatabaseTextStoreFactory, DatabaseUsersFactory

public abstract class DbQueryManagerFactory
extends Object

This class allows for DbQueryManagers to be created more dynamically and with more features than by direct instantiation.

By using the DbQueryManagerFactory, DbQueryManager child classes can have custom methods that are implemented by different "drivers", based on the database software behind the Datasource. Database "drivers" are looked up through the manager's classpath according to the package name and the encoded class name of the JDBC driver (dots are replaced by underscores). The default, or "generic" driver, must be created under this package and will be used when no specific driver can be found for a particular Datasource. All the created DbQueryManagers are cached in the provided cache and are re-used on successive calls rather than being re-instantiated.

Since:
1.0
Version:
$Revision: 3634 $
Author:
JR Boyens (jboyens[remove] at uwyn dot com), Geert Bevin (gbevin[remove] at uwyn dot com)

Constructor Summary
DbQueryManagerFactory()
           
 
Method Summary
protected static DbQueryManager getInstance(String managerPackageName, DbQueryManagerCache cache, Datasource datasource)
          Get a DbQueryManager instance.
protected static DbQueryManager getInstance(String managerPackageName, DbQueryManagerCache cache, Datasource datasource, String identifier)
          Get a DbQueryManager instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbQueryManagerFactory

public DbQueryManagerFactory()
Method Detail

getInstance

protected static DbQueryManager getInstance(String managerPackageName,
                                            DbQueryManagerCache cache,
                                            Datasource datasource)
Get a DbQueryManager instance.

Parameters:
managerPackageName - the package name that corresponds to the location of the manager
cache - the cache to be used to cache the DbQueryManagers
datasource - the datasource to instantiate the DbQueryManager for
Returns:
the created DbQueryManager instance
Since:
1.0

getInstance

protected static DbQueryManager getInstance(String managerPackageName,
                                            DbQueryManagerCache cache,
                                            Datasource datasource,
                                            String identifier)
Get a DbQueryManager instance.

Parameters:
managerPackageName - the package name that corresponds to the location of the manager
cache - the cache to be used to cache the DbQueryManagers
datasource - the datasource to instantiate the DbQueryManager for
identifier - the identifier to be used to uniquely identify this DbQueryManager
Returns:
the created DbQueryManager instance
Since:
1.0


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.