org.nakedobjects.runtime.persistence
Class PersistenceSessionFactoryDelegating

java.lang.Object
  extended by org.nakedobjects.runtime.persistence.PersistenceSessionFactoryDelegating
All Implemented Interfaces:
ApplicationScopedComponent, Component, SpecificationLoaderAware, FixturesInstalledFlag, PersistenceSessionFactory
Direct Known Subclasses:
InMemoryPersistenceSessionFactory

public abstract class PersistenceSessionFactoryDelegating
extends java.lang.Object
implements PersistenceSessionFactory, FixturesInstalledFlag

Implementation that just delegates to a supplied PersistenceSessionFactory.


Constructor Summary
PersistenceSessionFactoryDelegating(DeploymentType deploymentType, PersistenceSessionFactoryDelegate persistenceSessionFactoryDelegate)
           
 
Method Summary
 PersistenceSession createPersistenceSession()
          Creates a PersistenceSession with the implementing object as the PersistenceSession's owning factory.
protected  void doInit()
          Optional hook method for implementation-specific initialization.
protected  void doShutdown()
          Optional hook method for implementation-specific shutdown.
 PersistenceSessionFactoryDelegate getDelegate()
           
 DeploymentType getDeploymentType()
           
 java.util.List<java.lang.Object> getServices()
           
 SpecificationLoader getSpecificationLoader()
          Make available when creating PersistenceSessions.
 void init()
           
 java.lang.Boolean isFixturesInstalled()
           
 void setFixturesInstalled(java.lang.Boolean fixturesInstalled)
           
 void setServices(java.util.List<java.lang.Object> serviceList)
           
 void setSpecificationLoader(SpecificationLoader specificationLoader)
          Injected prior to init().
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceSessionFactoryDelegating

public PersistenceSessionFactoryDelegating(DeploymentType deploymentType,
                                           PersistenceSessionFactoryDelegate persistenceSessionFactoryDelegate)
Method Detail

getDeploymentType

public DeploymentType getDeploymentType()
Specified by:
getDeploymentType in interface PersistenceSessionFactory

getDelegate

public PersistenceSessionFactoryDelegate getDelegate()

createPersistenceSession

public PersistenceSession createPersistenceSession()
Description copied from interface: PersistenceSessionFactory
Creates a PersistenceSession with the implementing object as the PersistenceSession's owning factory.

Specified by:
createPersistenceSession in interface PersistenceSessionFactory

init

public final void init()
Specified by:
init in interface ApplicationScopedComponent

doInit

protected void doInit()
Optional hook method for implementation-specific initialization.


shutdown

public final void shutdown()
Specified by:
shutdown in interface ApplicationScopedComponent

doShutdown

protected void doShutdown()
Optional hook method for implementation-specific shutdown.


isFixturesInstalled

public java.lang.Boolean isFixturesInstalled()
Specified by:
isFixturesInstalled in interface FixturesInstalledFlag

setFixturesInstalled

public void setFixturesInstalled(java.lang.Boolean fixturesInstalled)
Specified by:
setFixturesInstalled in interface FixturesInstalledFlag

getServices

public java.util.List<java.lang.Object> getServices()
Specified by:
getServices in interface PersistenceSessionFactory

setServices

public void setServices(java.util.List<java.lang.Object> serviceList)
Specified by:
setServices in interface PersistenceSessionFactory

getSpecificationLoader

public SpecificationLoader getSpecificationLoader()
Description copied from interface: PersistenceSessionFactory
Make available when creating PersistenceSessions.

Needed for the RuntimeContextFromSession.

Specified by:
getSpecificationLoader in interface PersistenceSessionFactory
See Also:
setSpecificationLoader(SpecificationLoader)

setSpecificationLoader

public void setSpecificationLoader(SpecificationLoader specificationLoader)
Injected prior to init().

Specified by:
setSpecificationLoader in interface SpecificationLoaderAware


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.