org.compass.gps.device.jpa.embedded.toplink
Class EmbeddedToplinkEventListener

java.lang.Object
  extended by org.compass.gps.device.jpa.AbstractCompassJpaEntityListener
      extended by org.compass.gps.device.jpa.AbstractDeviceJpaEntityListener
          extended by org.compass.gps.device.jpa.embedded.toplink.EmbeddedToplinkEventListener
All Implemented Interfaces:
EventListener, oracle.toplink.essentials.descriptors.DescriptorEventListener

public class EmbeddedToplinkEventListener
extends AbstractDeviceJpaEntityListener
implements oracle.toplink.essentials.descriptors.DescriptorEventListener

An event listener that mirrors changes done through toplink to Compass when using TopLink embedded support. Uses TopLinkHelper.getCurrentCompassSession(oracle.toplink.essentials.sessions.Session) in order to get the current CompassSession and perform with it the relevant mirror operations.

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.gps.device.jpa.AbstractCompassJpaEntityListener
log
 
Constructor Summary
EmbeddedToplinkEventListener(JpaGpsDevice device)
           
 
Method Summary
 void aboutToDelete(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void aboutToInsert(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void aboutToUpdate(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
protected  JpaGpsDevice getDevice()
           
 boolean isOverriddenEvent(oracle.toplink.essentials.descriptors.DescriptorEvent event, Vector eventManagers)
           
 void postBuild(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void postClone(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void postDelete(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void postInsert(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void postMerge(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void postRefresh(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void postUpdate(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void postWrite(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void preDelete(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void preInsert(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void prePersist(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void preRemove(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void preUpdate(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void preUpdateWithChanges(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 void preWrite(oracle.toplink.essentials.descriptors.DescriptorEvent event)
           
 
Methods inherited from class org.compass.gps.device.jpa.AbstractDeviceJpaEntityListener
disable, getCompass
 
Methods inherited from class org.compass.gps.device.jpa.AbstractCompassJpaEntityListener
hasMappingForEntity, hasMappingForEntity, postPersist, postRemove, postUpdate, throwExceptionOnError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedToplinkEventListener

public EmbeddedToplinkEventListener(JpaGpsDevice device)
Method Detail

getDevice

protected JpaGpsDevice getDevice()
Specified by:
getDevice in class AbstractDeviceJpaEntityListener

postUpdate

public void postUpdate(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
postUpdate in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

postDelete

public void postDelete(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
postDelete in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

postInsert

public void postInsert(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
postInsert in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

aboutToDelete

public void aboutToDelete(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
aboutToDelete in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

aboutToInsert

public void aboutToInsert(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
aboutToInsert in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

aboutToUpdate

public void aboutToUpdate(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
aboutToUpdate in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

isOverriddenEvent

public boolean isOverriddenEvent(oracle.toplink.essentials.descriptors.DescriptorEvent event,
                                 Vector eventManagers)
Specified by:
isOverriddenEvent in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

postBuild

public void postBuild(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
postBuild in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

postClone

public void postClone(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
postClone in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

postMerge

public void postMerge(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
postMerge in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

postRefresh

public void postRefresh(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
postRefresh in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

postWrite

public void postWrite(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
postWrite in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

preDelete

public void preDelete(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
preDelete in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

preInsert

public void preInsert(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
preInsert in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

prePersist

public void prePersist(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
prePersist in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

preRemove

public void preRemove(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
preRemove in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

preUpdate

public void preUpdate(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
preUpdate in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

preUpdateWithChanges

public void preUpdateWithChanges(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
preUpdateWithChanges in interface oracle.toplink.essentials.descriptors.DescriptorEventListener

preWrite

public void preWrite(oracle.toplink.essentials.descriptors.DescriptorEvent event)
Specified by:
preWrite in interface oracle.toplink.essentials.descriptors.DescriptorEventListener


Copyright (c) 2004-2008 The Compass Project.