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

All Superinterfaces:
IAbstractFactory
All Known Subinterfaces:
IGenericDaoFactory
All Known Implementing Classes:
AbstractDaoFactory, HibernateDaoFactory, JpaDaoFactory, LocalDaoFactory

public interface IBaseDaoFactory
extends IAbstractFactory

Abstract Factory for creating instances of IBaseReadOnlyDao and IBaseDao types

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

Method Summary
<Id extends Serializable,Element>
IBaseDao<Id,Element>
createDao(Class<Element> aPersistentClass)
          Returns the Base DAO implementation corresponding to the given model class type.
<Id extends Serializable,Element>
IBaseReadOnlyDao<Id,Element>
createReadOnlyDao(Class<Element> aPersistentClass)
          Returns the Base Read-Only DAO implementation corresponding to the given model class type.
 void setDaoSessionStrategy(ISessionStrategy aDaoSessionStrategy)
          Sets the DaoSessionStrategy
 void setDaoTransactionStrategy(ITransactionStrategy aDaoTransactionStrategy)
          Sets the DaoTransactionStrategy
 void shutdown()
          Shuts down all DAO services, does all the necessary clean up
 

Method Detail

createReadOnlyDao

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

Type Parameters:
Id - Id type
Element - Element type
Parameters:
aPersistentClass - Data model class type
Returns:
Base 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> IBaseDao<Id,Element> createDao(Class<Element> aPersistentClass)
                                                    throws IllegalArgumentException
Returns the Base DAO implementation corresponding to the given model class type. Provides a generic and reusable means to create cached DAO instances.

Type Parameters:
Id - Id type
Element - Element type
Parameters:
aPersistentClass - Data model class type
Returns:
Base DAO implementation corresponding to the given model class type
Throws:
IllegalArgumentException - 'aPersistentClass' must not be null
IllegalArgumentException - 'aPersistentClass' must be a class type

setDaoSessionStrategy

void setDaoSessionStrategy(ISessionStrategy aDaoSessionStrategy)
                           throws IllegalArgumentException
Sets the DaoSessionStrategy

Parameters:
aDaoSessionStrategy - ISessionStrategy to set
Throws:
IllegalArgumentException - 'aDaoSessionStrategy' must not be null

setDaoTransactionStrategy

void setDaoTransactionStrategy(ITransactionStrategy aDaoTransactionStrategy)
                               throws IllegalArgumentException
Sets the DaoTransactionStrategy

Parameters:
aDaoTransactionStrategy - ITransactionStrategy to set
Throws:
IllegalArgumentException - 'aDaoTransactionStrategy' must not be null

shutdown

void shutdown()
              throws DaoException
Shuts down all DAO services, does all the necessary clean up

Throws:
DaoException


Copyright © 2007-2009. All Rights Reserved.