|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
org.apache.ojb.broker.util.event.OjbEvent
org.apache.ojb.broker.PersistenceBrokerEvent
org.apache.ojb.broker.PBLifeCycleEvent
The PBLifeCycleEvent encapsulates information about
the life-cycle of a persistent object.
NOTE:
Because of performance reasons OJB intern reuse instances of this class
by reset target object.
| Nested Class Summary | |
static class |
PBLifeCycleEvent.Type
Enum-like class for the event types. |
| Field Summary | |
static int |
TYPE_AFTER_DELETE
Denotes an event that happens after the deletion of an object. |
static int |
TYPE_AFTER_INSERT
Denotes an event that happens after the insertion of an object. |
static int |
TYPE_AFTER_LOOKUP
Denotes an event that happens after the lookup of an object. |
static int |
TYPE_AFTER_UPDATE
Denotes an event that happens after the update of an object. |
static int |
TYPE_BEFORE_DELETE
Denotes an event that happens before the deletion of an object. |
static int |
TYPE_BEFORE_INSERT
Denotes an event that happens before the insertion of an object. |
static int |
TYPE_BEFORE_UPDATE
Denotes an event that happens before the update of an object. |
| Constructor Summary | |
PBLifeCycleEvent(PersistenceBroker broker,
java.lang.Object target,
PBLifeCycleEvent.Type eventType)
Creates a new event instance. |
|
PBLifeCycleEvent(PersistenceBroker broker,
PBLifeCycleEvent.Type type)
Creates a new event instance. |
|
| Method Summary | |
PBLifeCycleEvent.Type |
getEventType()
Returns the event type. |
PersistenceBrokerAware |
getPersitenceBrokerAware()
Returns the target object as an instance of PersistenceBrokerAware if possible. |
java.lang.Object |
getTarget()
Returns the object that caused the event. |
void |
setTarget(java.lang.Object obj)
Set the object that caused the event. |
java.lang.String |
toString()
|
| Methods inherited from class org.apache.ojb.broker.PersistenceBrokerEvent |
getTriggeringBroker |
| Methods inherited from class java.util.EventObject |
getSource |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int TYPE_BEFORE_INSERT
public static final int TYPE_BEFORE_DELETE
public static final int TYPE_BEFORE_UPDATE
public static final int TYPE_AFTER_UPDATE
public static final int TYPE_AFTER_DELETE
public static final int TYPE_AFTER_LOOKUP
public static final int TYPE_AFTER_INSERT
| Constructor Detail |
public PBLifeCycleEvent(PersistenceBroker broker,
java.lang.Object target,
PBLifeCycleEvent.Type eventType)
broker - The brokertarget - The object which caused the eventeventType - The type of the event
public PBLifeCycleEvent(PersistenceBroker broker,
PBLifeCycleEvent.Type type)
broker - The brokertype - The type of the event| Method Detail |
public PersistenceBrokerAware getPersitenceBrokerAware()
PersistenceBrokerAware if possible.
PersistenceBrokerAware instance if there is a target and it implements
this interfacepublic void setTarget(java.lang.Object obj)
obj - The objectpublic java.lang.Object getTarget()
public java.lang.String toString()
public PBLifeCycleEvent.Type getEventType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||