Class EntityUpdateEvent
- java.lang.Object
-
- org.openbravo.client.kernel.event.EntityPersistenceEvent
-
- org.openbravo.client.kernel.event.EntityUpdateEvent
-
public class EntityUpdateEvent extends EntityPersistenceEvent
The event object send out when an entity gets updated. To receive this event, create a class with a method which has this signature: public void onEvent(@Observes EntityUpdateEvent event) { Note, the method name is unimportant, the @Observes EntityUpdateEvent specifies that this method will be called before persisting a new instance.- Author:
- mtaal
-
-
Constructor Summary
Constructors Constructor Description EntityUpdateEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]
getPreviousState()
Get the complete array of previous states.Object
getPreviousState(Property property)
Returns the state of a property which was there when reading from the database.-
Methods inherited from class org.openbravo.client.kernel.event.EntityPersistenceEvent
getCurrentState, getCurrentState, getId, getPropertyNames, getTargetInstance, getTypes, isStateUpdated, setCurrentState
-
-
-
-
Method Detail
-
getPreviousState
public Object getPreviousState(Property property)
Returns the state of a property which was there when reading from the database.- Parameters:
property
- the property to get the old state- Returns:
- the old/previous state/value of the property
-
getPreviousState
public Object[] getPreviousState()
Get the complete array of previous states. To see what value corresponds to what property use theEntityPersistenceEvent.getPropertyNames()
array.
-
-