org.compass.gps.device.hibernate.lifecycle
Class HibernateEventListener

java.lang.Object
  extended by org.compass.gps.device.hibernate.lifecycle.HibernateEventListener
All Implemented Interfaces:
Serializable, PostDeleteEventListener, PostInsertEventListener, PostUpdateEventListener
Direct Known Subclasses:
HibernateCollectionEventListener

public class HibernateEventListener
extends Object
implements PostInsertEventListener, PostUpdateEventListener, PostDeleteEventListener

A default implementation for Hibernate lifecycle callbacks.

Author:
kimchy
See Also:
DefaultHibernateEntityLifecycleInjector, Serialized Form

Field Summary
protected  HibernateGpsDevice device
           
protected  org.apache.commons.logging.Log log
           
protected  boolean marshallIds
           
protected  HibernateMirrorFilter mirrorFilter
           
protected  boolean pendingCascades
           
protected  boolean processCollections
           
 
Constructor Summary
HibernateEventListener(HibernateGpsDevice device, boolean marshallIds, boolean pendingCascades, boolean processCollections)
           
 
Method Summary
protected  void doInsert(CompassSession session, PostInsertEvent postInsertEvent, Object entity, CompassGpsInterfaceDevice compassGps)
           
protected  void doUpdate(CompassSession session, CompassGpsInterfaceDevice compassGps, Object entity, EventSource eventSource)
           
 void onPostDelete(PostDeleteEvent postDeleteEvent)
           
 void onPostInsert(PostInsertEvent postInsertEvent)
           
 void onPostUpdate(PostUpdateEvent postUpdateEvent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log

device

protected final HibernateGpsDevice device

mirrorFilter

protected final HibernateMirrorFilter mirrorFilter

marshallIds

protected final boolean marshallIds

pendingCascades

protected final boolean pendingCascades

processCollections

protected final boolean processCollections
Constructor Detail

HibernateEventListener

public HibernateEventListener(HibernateGpsDevice device,
                              boolean marshallIds,
                              boolean pendingCascades,
                              boolean processCollections)
Method Detail

onPostInsert

public void onPostInsert(PostInsertEvent postInsertEvent)
Specified by:
onPostInsert in interface PostInsertEventListener

onPostUpdate

public void onPostUpdate(PostUpdateEvent postUpdateEvent)
Specified by:
onPostUpdate in interface PostUpdateEventListener

onPostDelete

public void onPostDelete(PostDeleteEvent postDeleteEvent)
Specified by:
onPostDelete in interface PostDeleteEventListener

doInsert

protected void doInsert(CompassSession session,
                        PostInsertEvent postInsertEvent,
                        Object entity,
                        CompassGpsInterfaceDevice compassGps)

doUpdate

protected void doUpdate(CompassSession session,
                        CompassGpsInterfaceDevice compassGps,
                        Object entity,
                        EventSource eventSource)


Copyright (c) 2004-2009 The Compass Project.