About event

manual

JPA Lifecycle Events

Explains how to use JPA lifecycle events (client side triggers) with callback methods and listener classes.... specify callback methods for the corresponding lifecycle event. See JavaDoc Reference Page... void onPrePersist ( ... specify callback methods for the corresponding lifecycle event. See JavaDoc Reference Page... void onPostPersist ( ...

 
manual

Advanced JPA Topics

Describes advanced JPA topics - detached entity objects, lock management and entity lifecycle events. This section discusses advanced JPA topics: Detached Entity Objects Locking in JPA JPA Lifecycle Events Shared (L2) Entity Cache JPA Metamodel API ...

 
forum_thread

Entity listener - event instead of object

Hi, Currently I'm playing with entity listener to implement auditing with difference between values in updated entity. There is a problem however with accessing "old" version of object stored in database. I can't find the nice way to use EntityManager in EntityListener. Because of that, I can't store separate entity for given event. Right now I'm using BaseEntity which contains ... of that, I can't store separate entity for given event. Right now I'm using BaseEntity which contains @ ... final boolean onPreUpdate ( PreUpdateEvent event ) { try { // TODO : ...

 
forum_thread

LifeCycle Event with Embeddable classes

Hello, is there a way that lifecycle events like prepersist or preupdate are also fired for embeddable classes, not just for entities? My case looks as follows: ... are not applicable for embeddable classes. You can set an event callback for the containing entity and use it to handle embedded objects ...

 
api-jdo

javax.jdo.listener.InstanceLifecycleEvent

This is the event class used in life cycle event notifications.(Class of JDO)

 
api-jdo

preStore(event)

Invoked whenever a persistent instance is stored, for example during javax.jdo.PersistenceManager.flush or javax.jdo.Transaction.commit.(Method of javax.jdo.listener.StoreLifecycleListener)

 
api-jdo

preClear(event)

This method is called before the implementation calls the instance method ClearCallback.jdoPreClear and before it clears the values in the instance to their Java default values.(Method of javax.jdo.listener.ClearLifecycleListener)

 
api-jdo

postStore(event)

Invoked whenever a persistent instance is stored, for example during javax.jdo.PersistenceManager.flush or javax.jdo.Transaction.commit.(Method of javax.jdo.listener.StoreLifecycleListener)

 
api-jdo

preDelete(event)

Invoked whenever a persistent instance is deleted, for example during javax.jdo.PersistenceManager.deletePersistent.(Method of javax.jdo.listener.DeleteLifecycleListener)

 
api-jdo

postDelete(event)

Invoked whenever a persistent instance is deleted, for example during javax.jdo.PersistenceManager.deletePersistent.(Method of javax.jdo.listener.DeleteLifecycleListener)