jhomenet.dao
Class DAOFactory

java.lang.Object
  extended by jhomenet.dao.DAOFactory
Direct Known Subclasses:
HibernateDAOFactory

public abstract class DAOFactory
extends java.lang.Object

Defines all DAOs and the concrete factories to get the conrecte DAOs.

Either use the DEFAULT to get the same concrete DAOFactory throughout your application, or a concrete factory by name, e.g. DAOFactory.HIBERNATE is a concrete HibernateDAOFactory.

Implementation: If you write a new DAO, this class has to know about it. If you add a new persistence mechanism, add an additional concrete factory for it to the enumeration of factories.

It probably wouldn't be a bad idea to move the DEFAULT setting into external configuration.

Author:
christian.bauer@jboss.com, David Irwin

Field Summary
static DAOFactory DEFAULT
          Default DAO factory.
static DAOFactory HIBERNATE
          The Hibernate factory object.
 
Constructor Summary
DAOFactory()
           
 
Method Summary
abstract  AbstractResponseDAO getAbstractResponseDAO()
           
abstract  HardwareDataDAO getHardwareDataDAO()
           
abstract  HomenetHardwareDAO getHomenetHardwareDAO()
           
abstract  PlanDAO getPlanDAO()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIBERNATE

public static final DAOFactory HIBERNATE
The Hibernate factory object.


DEFAULT

public static final DAOFactory DEFAULT
Default DAO factory.

Constructor Detail

DAOFactory

public DAOFactory()
Method Detail

getHomenetHardwareDAO

public abstract HomenetHardwareDAO getHomenetHardwareDAO()
Returns:
A reference to a jHomenet hardware DAO

getHardwareDataDAO

public abstract HardwareDataDAO getHardwareDataDAO()
Returns:
A reference to a hardware data DAO

getPlanDAO

public abstract PlanDAO getPlanDAO()
Returns:
A reference to a responsive plan DAO

getAbstractResponseDAO

public abstract AbstractResponseDAO getAbstractResponseDAO()
Returns:
A reference to an abstract responsive response DAO


Copyright © 2004-2005 David Irwin. All Rights Reserved.