InstanceLifecycleEvent
java.lang.Object ∟ java.util.EventObject ∟ javax.jdo.listener.InstanceLifecycleEvent
This is the event class used in life cycle event notifications.
Note that although InstanceLifecycleEvent inherits Serializable interface from EventObject, it is not intended to be Serializable. Appropriate serialization methods are implemented to throw NotSerializableException.
- Since:
- JDO 2.0
Public Constructors
InstanceLifecycleEvent(Object source, int type)
- Parameters:
source
- the instance that triggered the eventtype
- the event type
- Since:
- JDO 2.0
InstanceLifecycleEvent(Object source, int type, Object target)
- Parameters:
source
- the instance that triggered the eventtype
- the event typetarget
- the "other" instance
- Since:
- JDO 2.0
Public Methods
Object getDetachedInstance()
int getEventType()
- Return:
- the event type
- Since:
- JDO 2.0
Object getPersistentInstance()
Object getSource()
Although not deprecated, it is recommended that the the methods
getPersistentInstance()
and getDetachedInstance()
be used instead. - Return:
- The persistent instance on any pre- callback except preAttach, or the detached instance for a postDetach or preAttach callback.
- See Also:
getPersistentInstance()
getDetachedInstance()
"Section 12.15, Java Data Objects 2.0 Specification"
- Since:
- JDO 2.0
Object getTarget()
Although not deprecated, it is recommended that the the methods
getPersistentInstance()
and getDetachedInstance()
be used instead. - Return:
- The detached instance for preDetach and postAttach, the persistent instance otherwise.
- See Also:
getPersistentInstance()
getDetachedInstance()
"Section 12.15, Java Data Objects 2.0 Specification"
- Since:
- JDO 2.0
Public Static Fields
- Since:
- JDO 2.0
- Since:
- JDO 2.0
- Since:
- JDO 2.0
- Since:
- JDO 2.0
- Since:
- JDO 2.0
- Since:
- JDO 2.0
- Since:
- JDO 2.0
- Since:
- JDO 2.0