org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.listener
Class NakedLoadEventListener

java.lang.Object
  extended by org.hibernate.event.def.AbstractReassociateEventListener
      extended by org.hibernate.event.def.AbstractLockUpgradeEventListener
          extended by org.hibernate.event.def.DefaultLoadEventListener
              extended by org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.listener.NakedLoadEventListener
All Implemented Interfaces:
java.io.Serializable, org.hibernate.event.LoadEventListener

public class NakedLoadEventListener
extends org.hibernate.event.def.DefaultLoadEventListener

Implementation of LoadEventListener that mostly has the same behaviour as DefaultLoadEventListener, but that which uses Naked Objects' ghost objects for lazy loading rather than Hibernate's proxies.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.event.LoadEventListener
org.hibernate.event.LoadEventListener.LoadType
 
Field Summary
 
Fields inherited from class org.hibernate.event.def.DefaultLoadEventListener
DEFAULT_LOCK_MODE, INCONSISTENT_RTN_CLASS_MARKER, REMOVED_ENTITY_MARKER
 
Fields inherited from interface org.hibernate.event.LoadEventListener
GET, IMMEDIATE_LOAD, INTERNAL_LOAD_EAGER, INTERNAL_LOAD_LAZY, INTERNAL_LOAD_NULLABLE, LOAD, RELOAD
 
Constructor Summary
NakedLoadEventListener()
           
 
Method Summary
protected  PersistenceSession getPersistenceSession()
           
protected  SpecificationLoader getSpecificationLoader()
           
 void onLoad(org.hibernate.event.LoadEvent event, org.hibernate.event.LoadEventListener.LoadType loadType)
          Just adds some debugging, is all.
protected  java.lang.Object proxyOrLoad(org.hibernate.event.LoadEvent event, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.EntityKey keyToLoad, org.hibernate.event.LoadEventListener.LoadType options)
          Similar to the default implementation, but uses Naked Objects' 'ghost' objects rather than Hibernate's proxies.
 
Methods inherited from class org.hibernate.event.def.DefaultLoadEventListener
doLoad, load, loadFromDatasource, loadFromSecondLevelCache, loadFromSessionCache, lockAndLoad
 
Methods inherited from class org.hibernate.event.def.AbstractLockUpgradeEventListener
upgradeLock
 
Methods inherited from class org.hibernate.event.def.AbstractReassociateEventListener
reassociate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NakedLoadEventListener

public NakedLoadEventListener()
Method Detail

onLoad

public void onLoad(org.hibernate.event.LoadEvent event,
                   org.hibernate.event.LoadEventListener.LoadType loadType)
            throws org.hibernate.HibernateException
Just adds some debugging, is all.

Specified by:
onLoad in interface org.hibernate.event.LoadEventListener
Overrides:
onLoad in class org.hibernate.event.def.DefaultLoadEventListener
Throws:
org.hibernate.HibernateException

proxyOrLoad

protected java.lang.Object proxyOrLoad(org.hibernate.event.LoadEvent event,
                                       org.hibernate.persister.entity.EntityPersister persister,
                                       org.hibernate.engine.EntityKey keyToLoad,
                                       org.hibernate.event.LoadEventListener.LoadType options)
                                throws org.hibernate.HibernateException
Similar to the default implementation, but uses Naked Objects' 'ghost' objects rather than Hibernate's proxies.

Overrides:
proxyOrLoad in class org.hibernate.event.def.DefaultLoadEventListener
Throws:
org.hibernate.HibernateException

getSpecificationLoader

protected SpecificationLoader getSpecificationLoader()

getPersistenceSession

protected PersistenceSession getPersistenceSession()


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