org.nakedobjects.remoting.client.persistence
Class PersistenceSessionProxy

java.lang.Object
  extended by org.nakedobjects.runtime.persistence.PersistenceSessionAbstract
      extended by org.nakedobjects.remoting.client.persistence.PersistenceSessionProxy
All Implemented Interfaces:
Component, Injectable, SessionScopedComponent, DebugInfo, SpecificationLoaderAware, PersistenceSession, PersistenceSessionAdaptedServiceManager, PersistenceSessionContainer, PersistenceSessionForceReloader, PersistenceSessionHydrator, PersistenceSessionTestSupport, PersistenceSessionTransactionManagement, NakedObjectTransactionManagerAware

public class PersistenceSessionProxy
extends PersistenceSessionAbstract


Constructor Summary
PersistenceSessionProxy(PersistenceSessionFactory persistenceSessionFactory, AdapterFactory adapterFactory, ObjectFactory objectFactory, ServicesInjector containerInjector, OidGenerator oidGenerator, AdapterManagerExtended adapterManager, ServerFacade serverFacade, ObjectEncoderDecoder encoder)
           
 
Method Summary
 void debugData(DebugString debug)
           
 java.lang.String debugTitle()
           
 void destroyObject(NakedObject object)
           
protected  void destroyObjectInPersistenceLayer(NakedObject object)
           
 void doClose()
          TODO: mismatch between SessionScopedComponent (open) and ApplicationScopedComponent (init).
 void doOpen()
          TODO: mismatch between SessionScopedComponent (open) and ApplicationScopedComponent (init).
protected  NakedObject[] getInstances(PersistenceQuery persistenceQuery)
           
 Oid getOidForService(java.lang.String name)
          TODO: not symmetric with PersistenceSessionObjectStore; we have a cache but it does not?
 ClientSideTransactionManager getTransactionManager()
          Just downcasts.
 boolean hasInstances(NakedObjectSpecification specification)
           
 boolean isFixturesInstalled()
          No need to install fixtures, rely on server-side to do the right thing.
 NakedObject loadObject(Oid oid, NakedObjectSpecification hintSpec)
           
 void makePersistent(NakedObject object)
          REVIEW: we should perhaps have a little more symmetry here, and have the ServerFacade callback to the PersistenceSession (the PersistenceSessionPersist API) to handle remapping of adapters.
protected  void makePersistentInPersistenceLayer(NakedObject object)
           
 void objectChanged(NakedObject adapter)
           
 void registerService(java.lang.String name, Oid oid)
          TODO: not symmetric with PersistenceSessionObjectStore; we have a cache but it does not?
 void reload(NakedObject object)
           
 void resolveField(NakedObject adapter, NakedObjectAssociation field)
           
 void resolveImmediately(NakedObject adapter)
           
 
Methods inherited from class org.nakedobjects.runtime.persistence.PersistenceSessionAbstract
clearAllDirty, close, createInstance, createPersistenceQueryFor, doOpened, ensureNotOpened, ensureOpen, findInstances, findInstances, getAdapterFactory, getAdapterManager, getObjectFactory, getOidGenerator, getPersistenceSessionFactory, getService, getServices, getServicesInjector, getSpecificationLoader, hasServices, injectInto, isCheckObjectsForDirtyFlag, isImmutable, objectChangedAllDirty, open, recreateAdapter, recreateAdapter, reload, setDirtiableSupport, setSpecificationLoader, setTransactionManager, testReset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceSessionProxy

public PersistenceSessionProxy(PersistenceSessionFactory persistenceSessionFactory,
                               AdapterFactory adapterFactory,
                               ObjectFactory objectFactory,
                               ServicesInjector containerInjector,
                               OidGenerator oidGenerator,
                               AdapterManagerExtended adapterManager,
                               ServerFacade serverFacade,
                               ObjectEncoderDecoder encoder)
Method Detail

doOpen

public void doOpen()
TODO: mismatch between SessionScopedComponent (open) and ApplicationScopedComponent (init).

Overrides:
doOpen in class PersistenceSessionAbstract

doClose

public void doClose()
TODO: mismatch between SessionScopedComponent (open) and ApplicationScopedComponent (init).

Overrides:
doClose in class PersistenceSessionAbstract

isFixturesInstalled

public boolean isFixturesInstalled()
No need to install fixtures, rely on server-side to do the right thing.


loadObject

public NakedObject loadObject(Oid oid,
                              NakedObjectSpecification hintSpec)

reload

public void reload(NakedObject object)
Specified by:
reload in interface PersistenceSessionForceReloader
Specified by:
reload in class PersistenceSessionAbstract

resolveImmediately

public void resolveImmediately(NakedObject adapter)

resolveField

public void resolveField(NakedObject adapter,
                         NakedObjectAssociation field)

makePersistent

public void makePersistent(NakedObject object)
REVIEW: we should perhaps have a little more symmetry here, and have the ServerFacade callback to the PersistenceSession (the PersistenceSessionPersist API) to handle remapping of adapters.


makePersistentInPersistenceLayer

protected void makePersistentInPersistenceLayer(NakedObject object)

objectChanged

public void objectChanged(NakedObject adapter)

destroyObject

public void destroyObject(NakedObject object)

destroyObjectInPersistenceLayer

protected void destroyObjectInPersistenceLayer(NakedObject object)

getInstances

protected NakedObject[] getInstances(PersistenceQuery persistenceQuery)
Specified by:
getInstances in class PersistenceSessionAbstract

hasInstances

public boolean hasInstances(NakedObjectSpecification specification)

getOidForService

public Oid getOidForService(java.lang.String name)
TODO: not symmetric with PersistenceSessionObjectStore; we have a cache but it does not?

Specified by:
getOidForService in class PersistenceSessionAbstract

registerService

public void registerService(java.lang.String name,
                            Oid oid)
TODO: not symmetric with PersistenceSessionObjectStore; we have a cache but it does not?

Specified by:
registerService in class PersistenceSessionAbstract

getTransactionManager

public ClientSideTransactionManager getTransactionManager()
Just downcasts.

Specified by:
getTransactionManager in interface PersistenceSession
Overrides:
getTransactionManager in class PersistenceSessionAbstract

debugData

public void debugData(DebugString debug)
Specified by:
debugData in interface DebugInfo
Overrides:
debugData in class PersistenceSessionAbstract

debugTitle

public java.lang.String debugTitle()


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