com.jenkov.mrpersister.itf
Interface IGenericDaoFactory

All Known Implementing Classes:
GenericDaoFactory

public interface 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.
 

Method Detail

createDao

IGenericDao createDao(java.sql.Connection connection)
Creates an IGenericDao instance that will use the given connection to do it's work.

Parameters:
connection - The connection the generic dao is to use.
Returns:
An IGenericDao instance.

createDao

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. For more information on persistence configurations see the IPersistenceConfiguration interface JavaDoc.

Parameters:
connection - The connection the generic dao is to use.
configuration - The persistence configuration the dao is to use.
Returns:
An IGenericDao instance.

createDao

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. If no configuration is stored by that key a new configuration will be created and stored for later use.

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.