org.perfectjpattern.jee.api.integration.dao
Interface IGenericDaoFactory

All Superinterfaces:
IAbstractFactory, IBaseDaoFactory
All Known Implementing Classes:
HibernateDaoFactory, LocalDaoFactory

public interface IGenericDaoFactory
extends IBaseDaoFactory

Abstract Factory for creating instances of IGenericReadOnlyDao and IGenericDao types

Version:
$ $Date: Dec 5, 2008 5:26:23 PM $
Author:
Giovanni Azua
 

Method Summary
<Id extends Serializable,Element>
IGenericDao<Id,Element>
createDao(Class<Element> aPersistentClass)
          Returns the Generic DAO implementation corresponding to the given model class type.
<Id extends Serializable,Element>
IGenericReadOnlyDao<Id,Element>
createReadOnlyDao(Class<Element> aPersistentClass)
          Returns the Generic Read-Only DAO implementation corresponding to the given model class type.
 
Methods inherited from interface org.perfectjpattern.jee.api.integration.dao.IBaseDaoFactory
setDaoSessionStrategy, setDaoTransactionStrategy, shutdown
 

Method Detail

createReadOnlyDao

<Id extends Serializable,Element> IGenericReadOnlyDao<Id,Element> createReadOnlyDao(Class<Element> aPersistentClass)
                                                                       throws IllegalArgumentException
Returns the Generic Read-Only DAO implementation corresponding to the given model class type. Provides a generic and reusable means to create cached DAO instances.

Specified by:
createReadOnlyDao in interface IBaseDaoFactory
Type Parameters:
Id - Id type
Element - Element type
Parameters:
aPersistentClass - Data model class type
Returns:
Generic DAO implementation corresponding to the given model class type
Throws:
IllegalArgumentException - 'aPersistentClass' must not be null
IllegalArgumentException - 'aPersistentClass' must be a class type

createDao

<Id extends Serializable,Element> IGenericDao<Id,Element> createDao(Class<Element> aPersistentClass)
                                                       throws IllegalArgumentException
Returns the Generic DAO implementation corresponding to the given model class type. Provides a generic and reusable means to create cached DAO instances.

Specified by:
createDao in interface IBaseDaoFactory
Type Parameters:
Id - Id type
Element - Element type
Parameters:
aPersistentClass - Data model class type
Returns:
Generic DAO implementation corresponding to the given model class type
Throws:
IllegalArgumentException - 'aPersistentClass' must not be null
IllegalArgumentException - 'aPersistentClass' must be a class type


Copyright © 2007-2009. All Rights Reserved.