Package com.groiss.event
Class BasicEvent
java.lang.Object
com.groiss.store.PersistentObject
com.groiss.event.BasicEvent
- All Implemented Interfaces:
KeyValuePair<String,
,String> Event
,Persistent
,Serializable
,Cloneable
Implementation of the Event class.
- See Also:
-
Field Summary
Fields inherited from class com.groiss.store.PersistentObject
filled, oid
Fields inherited from interface com.groiss.store.Persistent
emptyKeys
-
Constructor Summary
ConstructorDescriptionBasicEvent
(String name, ActivityInstance raiser, Object context, int txType) Create an event. -
Method Summary
Modifier and TypeMethodDescriptionvoid
callback method which will be called after the event has successfully been dispatchedboolean
returns the context objectThis method return a field of the context object, useful if the context object is a formgetName()
returns the name of the eventThe date and time when the event has been raised.return the raiser of the eventThis method must return the table name of the database table in which this persistent object is stored.int
get the transaction-type.boolean
isAbort()
can be used to notify the event-handler of an illegal statevoid
callback method which will be called if the event couldn't be dispatchedvoid
setAbort
(boolean abort) void
setForceDispatch
(boolean forceDispatch) toString()
Methods inherited from class com.groiss.store.PersistentObject
afterDelete, afterInsert, afterRead, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, clone, dbFields, equals, getKey, getKeys, getLocalClassName, getLocalObjectName, getOid, getValue, hashCode, isFilled, isValid, onDelete, onInsert, onRead, onUpdate, setFilled, setOid, setOid, toListString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.groiss.store.Persistent
getStore
-
Constructor Details
-
BasicEvent
public BasicEvent() -
BasicEvent
Create an event.- Parameters:
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 value
-
-
Method Details
-
afterDispatch
public void afterDispatch()Description copied from interface:Event
callback method which will be called after the event has successfully been dispatched- Specified by:
afterDispatch
in interfaceEvent
-
forcedDispatch
public boolean forcedDispatch()- Returns:
- the forceDispatch
-
getContext
Description copied from interface:Event
returns the context object- Specified by:
getContext
in interfaceEvent
-
getField
Description copied from interface:Event
This method return a field of the context object, useful if the context object is a form- Specified by:
getField
in interfaceEvent
- Throws:
NoSuchFieldException
IllegalAccessException
-
getName
Description copied from interface:Event
returns the name of the event -
getRaiseDate
Description copied from interface:Event
The date and time when the event has been raised.- Specified by:
getRaiseDate
in interfaceEvent
-
getRaiser
Description copied from interface:Event
return the raiser of the event -
getTableName
Description copied from interface:Persistent
This method must return the table name of the database table in which this persistent object is stored.- Specified by:
getTableName
in interfacePersistent
- Returns:
- The table name of the database table in which this persistent object is stored.
-
getTxType
public int getTxType()Description copied from interface:Event
get the transaction-type. At the moment, CURRENT_TX is the only supported type. -
onNotDispatched
public void onNotDispatched()Description copied from interface:Event
callback method which will be called if the event couldn't be dispatched- Specified by:
onNotDispatched
in interfaceEvent
-
setForceDispatch
public void setForceDispatch(boolean forceDispatch) - Parameters:
forceDispatch
- the forceDispatch to set
-
toString
-
setAbort
public void setAbort(boolean abort) -
isAbort
public boolean isAbort()Description copied from interface:Event
can be used to notify the event-handler of an illegal state
-