public class BasicEvent extends PersistentObject implements Event
filled, oid
emptyKeys
Constructor and Description |
---|
BasicEvent() |
BasicEvent(String name,
ActivityInstance raiser,
Object context,
int txType)
Create an event.
|
Modifier and Type | Method and Description |
---|---|
void |
afterDispatch()
callback method which will be called after the event has successfully been dispatched
|
boolean |
forcedDispatch() |
Object |
getContext()
returns the context object
|
Object |
getField(String fname)
This method return a field of the context object, useful if the context object is
a form
|
String |
getName()
returns the name of the event
|
Date |
getRaiseDate()
The date and time when the event has been raised.
|
ActivityInstance |
getRaiser()
return the raiser of the event
|
String |
getTableName()
This method must return the table name of the database table in which
this persistent object is stored.
|
int |
getTxType()
get the transaction-type.
|
boolean |
isAbort()
can be used to notify the event-handler of an illegal state
|
void |
onNotDispatched()
callback method which will be called if the event couldn't be dispatched
|
void |
setAbort(boolean abort) |
void |
setForceDispatch(boolean forceDispatch) |
String |
toString() |
afterDelete, afterInsert, afterRead, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, clone, dbFields, equals, getKey, getKeys, getLocalClassName, getLocalObjectName, getOid, getStore, getValue, hashCode, isFilled, isValid, onDelete, onInsert, onRead, onUpdate, setFilled, setOid, setOid, setStore, toListString
public BasicEvent()
public BasicEvent(String name, ActivityInstance raiser, Object context, int txType)
name
- the name of the event - must match the registration nameraiser
- the activity instance which raised the event, may be nullcontext
- context object: either a persistent or a string or null; if neither a String nor a Persistent is being used, a warning will be issued
and the context stays emptytxType
- the transaction type, at the moment, @see EventManager#CURRENT_TX is the only supported valuepublic void afterDispatch()
Event
afterDispatch
in interface Event
public boolean forcedDispatch()
public Object getContext()
Event
getContext
in interface Event
public Object getField(String fname) throws NoSuchFieldException, IllegalAccessException
Event
getField
in interface Event
NoSuchFieldException
IllegalAccessException
public String getName()
Event
public Date getRaiseDate()
Event
getRaiseDate
in interface Event
public ActivityInstance getRaiser()
Event
public String getTableName()
Persistent
getTableName
in interface Persistent
public int getTxType()
Event
getTxType
in interface Event
EventManager.CURRENT_TX
,
EventManager.NEW_TX
public void onNotDispatched()
Event
onNotDispatched
in interface Event
public void setForceDispatch(boolean forceDispatch)
forceDispatch
- the forceDispatch to setpublic void setAbort(boolean abort)
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.