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

postLoad(event)

Invoked whenever a persistent instance is loaded from the data store.(Method of javax.jdo.listener.LoadLifecycleListener)

 
api-jdo

postClear(event)

This method is called after the ClearCallback.jdoPreClear method is invoked on the instance and the fields have been cleared by the JDO implementation.(Method of javax.jdo.listener.ClearLifecycleListener)

 
api-jdo

preDetach(event)

This method is called during the execution of javax.jdo.PersistenceManager.detachCopy before the detached copy is made.(Method of javax.jdo.listener.DetachLifecycleListener)

 
api-jdo

preAttach(event)

This method is called before a detached instance is attached, via the javax.jdo.PersistenceManager.makePersistent method.(Method of javax.jdo.listener.AttachLifecycleListener)

 
api-jdo

postDelete(event)

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