org.minetti.astrodevice.server.hibernate.dao
Class DaoFactory

java.lang.Object
  extended by org.minetti.astrodevice.server.hibernate.dao.DaoFactory

public final class DaoFactory
extends Object

DAO factory used by the DaoModuleImpl class.

Author:
Jean-Philippe MINETTI

Constructor Summary
DaoFactory(javax.persistence.EntityManagerFactory factory)
          Constructor.
 
Method Summary
 void close()
          Closes the factory.
 DaoSession newDaoSession()
          Returns the session used for the DAO.
 DaoTransaction newDaoTransaction(DaoSession session)
          Creates and returns a new instance of transaction used to group multiple changing by DAO.
 DeviceSpecificationDao newDeviceSpecificationDao(DaoSession session)
          Creates and returns a new instance of DAO for specifications on devices.
 ObservingSiteDao newObservingSiteDao(DaoSession session)
          Creates and returns a new instance of DAO for observing sites.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DaoFactory

public DaoFactory(javax.persistence.EntityManagerFactory factory)
Constructor.

Parameters:
factory - Entity manager factory.
Method Detail

newDaoSession

public DaoSession newDaoSession()
Returns the session used for the DAO.

Returns:
Session used for the DAO.

newDaoTransaction

public DaoTransaction newDaoTransaction(DaoSession session)
Creates and returns a new instance of transaction used to group multiple changing by DAO.

Parameters:
session - Session used for the DAO.
Returns:
Transaction used to group multiple changing by DAO.

newObservingSiteDao

public ObservingSiteDao newObservingSiteDao(DaoSession session)
Creates and returns a new instance of DAO for observing sites.

Parameters:
session - Session used for the DAO.
Returns:
DAO for observing sites.

newDeviceSpecificationDao

public DeviceSpecificationDao newDeviceSpecificationDao(DaoSession session)
Creates and returns a new instance of DAO for specifications on devices.

Parameters:
session - Session used for the DAO.
Returns:
DAO for specifications on devices.

close

public void close()
Closes the factory.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 astroDevice. All Rights Reserved.