org.compass.gps.device.jpa.embedded.openjpa
Class EmbeddedOpenJPAEventListener
java.lang.Object
org.compass.gps.device.jpa.AbstractCompassJpaEntityListener
org.compass.gps.device.jpa.AbstractDeviceJpaEntityListener
org.compass.gps.device.jpa.embedded.openjpa.EmbeddedOpenJPAEventListener
- All Implemented Interfaces:
- org.apache.openjpa.event.DeleteListener, org.apache.openjpa.event.PersistListener, org.apache.openjpa.event.StoreListener
public class EmbeddedOpenJPAEventListener
- extends AbstractDeviceJpaEntityListener
- implements org.apache.openjpa.event.DeleteListener, org.apache.openjpa.event.PersistListener, org.apache.openjpa.event.StoreListener
The embedded open JPA event listener listens for after delete/store/persist events and applies them
to the index. No transaction handling is perfomed (assumes that it is a managed transaction) and usees
OpenJPAHelper.getCurrentCompassSession(javax.persistence.EntityManager)
in order to get the actual compass session.
- Author:
- kimchy
Method Summary |
void |
afterDelete(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
|
void |
afterPersist(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
|
void |
afterStore(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
|
void |
beforeDelete(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
|
void |
beforePersist(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
|
void |
beforeStore(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
|
protected JpaGpsDevice |
getDevice()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmbeddedOpenJPAEventListener
public EmbeddedOpenJPAEventListener(JpaGpsDevice device)
getDevice
protected JpaGpsDevice getDevice()
- Specified by:
getDevice
in class AbstractDeviceJpaEntityListener
beforeDelete
public void beforeDelete(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
- Specified by:
beforeDelete
in interface org.apache.openjpa.event.DeleteListener
afterDelete
public void afterDelete(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
- Specified by:
afterDelete
in interface org.apache.openjpa.event.DeleteListener
beforePersist
public void beforePersist(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
- Specified by:
beforePersist
in interface org.apache.openjpa.event.PersistListener
afterPersist
public void afterPersist(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
- Specified by:
afterPersist
in interface org.apache.openjpa.event.PersistListener
beforeStore
public void beforeStore(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
- Specified by:
beforeStore
in interface org.apache.openjpa.event.StoreListener
afterStore
public void afterStore(org.apache.openjpa.event.LifecycleEvent lifecycleEvent)
- Specified by:
afterStore
in interface org.apache.openjpa.event.StoreListener
Copyright (c) 2004-2008 The Compass Project.