org.perfectjpattern.jee.integration.dao
Class JpaDaoFactory

java.lang.Object
  extended by org.perfectjpattern.jee.integration.dao.AbstractDaoFactory
      extended by org.perfectjpattern.jee.integration.dao.JpaDaoFactory
All Implemented Interfaces:
IAbstractFactory, ISingleton, IBaseDaoFactory

public class JpaDaoFactory
extends AbstractDaoFactory

Concrete implementation for IBaseDaoFactory

Version:
$ $Date: Dec 5, 2008 5:11:45 PM $
Author:
Giovanni Azua
 

Constructor Summary
protected JpaDaoFactory()
          Defaults to JSE mode
protected JpaDaoFactory(ISessionStrategy aSessionStrategy, ITransactionStrategy aTransactionStrategy)
          Constructs JpaDaoFactory to consume Session instances from the given ISessionStrategy and Transaction instances from the ITransactionStrategy
 
Method Summary
protected
<Id extends Serializable,Element>
IBaseDao<Id,Element>
createDao(Class<Element> aPersistentClass, ISessionStrategy aSessionStrategy, ITransactionStrategy aTransactionStrategy)
           
static JpaDaoFactory getInstance()
          Returns Singleton instance of JpaDaoFactory
 
Methods inherited from class org.perfectjpattern.jee.integration.dao.AbstractDaoFactory
createDao, createReadOnlyDao, setDaoSessionStrategy, setDaoTransactionStrategy, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpaDaoFactory

protected JpaDaoFactory(ISessionStrategy aSessionStrategy,
                        ITransactionStrategy aTransactionStrategy)
                 throws IllegalArgumentException
Constructs JpaDaoFactory to consume Session instances from the given ISessionStrategy and Transaction instances from the ITransactionStrategy

Parameters:
aSessionStrategy - ISessionStrategy to consume Session instances from
aTransactionStrategy - ITransactionStrategy to consume Transaction instances from
Throws:
IllegalArgumentException - 'aDaoSessionStrategy' must not be null
IllegalArgumentException - 'aDaoTransactionStrategy' must not be null

JpaDaoFactory

protected JpaDaoFactory()
Defaults to JSE mode

Method Detail

getInstance

public static JpaDaoFactory getInstance()
Returns Singleton instance of JpaDaoFactory

Returns:
Singleton instance of JpaDaoFactory

createDao

protected <Id extends Serializable,Element> IBaseDao<Id,Element> createDao(Class<Element> aPersistentClass,
                                                                           ISessionStrategy aSessionStrategy,
                                                                           ITransactionStrategy aTransactionStrategy)
Specified by:
createDao in class AbstractDaoFactory


Copyright © 2007-2009. All Rights Reserved.