com.jenkov.mrpersister.impl
Class GenericDaoFactory
java.lang.Object
com.jenkov.mrpersister.impl.GenericDaoFactory
- All Implemented Interfaces:
- IGenericDaoFactory
public class GenericDaoFactory
- extends java.lang.Object
- implements IGenericDaoFactory
- Author:
- Jakob Jenkov - Copyright 2005 Jenkov Development
Method Summary |
IGenericDao |
createDao(java.sql.Connection connection)
Creates an IGenericDao instance that will use the given connection
to do it's work. |
IGenericDao |
createDao(java.sql.Connection connection,
IPersistenceConfiguration configuration)
Creates an IGenericDao instance that will use the given
connection and IPersistenceConfiguration instance to do it's work. |
IGenericDao |
createDao(java.sql.Connection connection,
java.lang.Object configKey)
Creates an IGenericDao instance that uses the given connection
and the persistence configuration stored by the given key in the
persistence configuration factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
persistenceManager
protected PersistenceManager persistenceManager
GenericDaoFactory
public GenericDaoFactory()
GenericDaoFactory
public GenericDaoFactory(PersistenceManager persistenceManager)
createDao
public IGenericDao createDao(java.sql.Connection connection)
- Description copied from interface:
IGenericDaoFactory
- Creates an
IGenericDao
instance that will use the given connection
to do it's work.
- Specified by:
createDao
in interface IGenericDaoFactory
- Parameters:
connection
- The connection the generic dao is to use.
- Returns:
- An
IGenericDao
instance.
createDao
public IGenericDao createDao(java.sql.Connection connection,
java.lang.Object configKey)
- Description copied from interface:
IGenericDaoFactory
- Creates an IGenericDao instance that uses the given connection
and the persistence configuration stored by the given key in the
persistence configuration factory. If no configuration is stored by that
key a new configuration will be created and stored for later use.
- Specified by:
createDao
in interface IGenericDaoFactory
- Parameters:
connection
- The connection the generic dao is to use.configKey
- The key of the persistence configuration to use / create and use.
- Returns:
- An IGenericDao instance.
createDao
public IGenericDao createDao(java.sql.Connection connection,
IPersistenceConfiguration configuration)
- Description copied from interface:
IGenericDaoFactory
- Creates an
IGenericDao
instance that will use the given
connection and IPersistenceConfiguration
instance to do it's work.
For more information on persistence configurations see the
IPersistenceConfiguration
interface JavaDoc.
- Specified by:
createDao
in interface IGenericDaoFactory
- Parameters:
connection
- The connection the generic dao is to use.configuration
- The persistence configuration the dao is to use.
- Returns:
- An
IGenericDao
instance.