org.compass.gps.device.jpa.embedded.eclipselink
Class EclipseLinkEventListener

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.eclipselink.EclipseLinkEventListener
All Implemented Interfaces:
EventListener, org.eclipse.persistence.descriptors.DescriptorEventListener

public class EclipseLinkEventListener
extends AbstractDeviceJpaEntityListener
implements org.eclipse.persistence.descriptors.DescriptorEventListener

An event listener that mirrors changes done through EclipseLink to Compass when using EclipseLink embedded support. Uses EclipseLinkHelper.getCurrentCompassSession(org.eclipse.persistence.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
EclipseLinkEventListener(JpaGpsDevice device)
           
 
Method Summary
 void aboutToDelete(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void aboutToInsert(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void aboutToUpdate(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
protected  JpaGpsDevice getDevice()
           
 boolean isOverriddenEvent(org.eclipse.persistence.descriptors.DescriptorEvent event, Vector eventManagers)
           
 void postBuild(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void postClone(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void postDelete(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void postInsert(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void postMerge(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void postRefresh(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void postUpdate(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void postWrite(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void preDelete(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void preInsert(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void prePersist(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void preRemove(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void preUpdate(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void preUpdateWithChanges(org.eclipse.persistence.descriptors.DescriptorEvent event)
           
 void preWrite(org.eclipse.persistence.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

EclipseLinkEventListener

public EclipseLinkEventListener(JpaGpsDevice device)
Method Detail

getDevice

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

postUpdate

public void postUpdate(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
postUpdate in interface org.eclipse.persistence.descriptors.DescriptorEventListener

postDelete

public void postDelete(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
postDelete in interface org.eclipse.persistence.descriptors.DescriptorEventListener

postInsert

public void postInsert(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
postInsert in interface org.eclipse.persistence.descriptors.DescriptorEventListener

aboutToDelete

public void aboutToDelete(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
aboutToDelete in interface org.eclipse.persistence.descriptors.DescriptorEventListener

aboutToInsert

public void aboutToInsert(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
aboutToInsert in interface org.eclipse.persistence.descriptors.DescriptorEventListener

aboutToUpdate

public void aboutToUpdate(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
aboutToUpdate in interface org.eclipse.persistence.descriptors.DescriptorEventListener

isOverriddenEvent

public boolean isOverriddenEvent(org.eclipse.persistence.descriptors.DescriptorEvent event,
                                 Vector eventManagers)
Specified by:
isOverriddenEvent in interface org.eclipse.persistence.descriptors.DescriptorEventListener

postBuild

public void postBuild(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
postBuild in interface org.eclipse.persistence.descriptors.DescriptorEventListener

postClone

public void postClone(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
postClone in interface org.eclipse.persistence.descriptors.DescriptorEventListener

postMerge

public void postMerge(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
postMerge in interface org.eclipse.persistence.descriptors.DescriptorEventListener

postRefresh

public void postRefresh(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
postRefresh in interface org.eclipse.persistence.descriptors.DescriptorEventListener

postWrite

public void postWrite(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
postWrite in interface org.eclipse.persistence.descriptors.DescriptorEventListener

preDelete

public void preDelete(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
preDelete in interface org.eclipse.persistence.descriptors.DescriptorEventListener

preInsert

public void preInsert(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
preInsert in interface org.eclipse.persistence.descriptors.DescriptorEventListener

prePersist

public void prePersist(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
prePersist in interface org.eclipse.persistence.descriptors.DescriptorEventListener

preRemove

public void preRemove(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
preRemove in interface org.eclipse.persistence.descriptors.DescriptorEventListener

preUpdate

public void preUpdate(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
preUpdate in interface org.eclipse.persistence.descriptors.DescriptorEventListener

preUpdateWithChanges

public void preUpdateWithChanges(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
preUpdateWithChanges in interface org.eclipse.persistence.descriptors.DescriptorEventListener

preWrite

public void preWrite(org.eclipse.persistence.descriptors.DescriptorEvent event)
Specified by:
preWrite in interface org.eclipse.persistence.descriptors.DescriptorEventListener


Copyright (c) 2004-2009 The Compass Project.