com.groiss.event
Class BasicEvent

java.lang.Object
  extended by com.groiss.store.PersistentObject
      extended by com.groiss.event.BasicEvent
All Implemented Interfaces:
KeyValuePair<java.lang.Object,java.lang.Object>, Event, Persistent, java.io.Serializable, java.lang.Cloneable

public class BasicEvent
extends PersistentObject
implements Event

Implementation of the Event class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.groiss.store.PersistentObject
filled, oid
 
Constructor Summary
BasicEvent()
           
BasicEvent(java.lang.String name, ActivityInstance raiser, java.lang.Object f, int txType)
           
 
Method Summary
 void afterDispatch()
          callback method which will be called after the event has successfully been dispatched
 boolean forcedDispatch()
           
 java.lang.Object getContext()
          returns the context object
 java.lang.Object getField(java.lang.String fname)
          This method return a field of the context object, useful if the context object is a form
 java.lang.String getName()
          returns the name of the event
 java.util.Date getRaiseDate()
          The date and time when the event has been raised.
 ActivityInstance getRaiser()
          return the raiser of the event
 java.lang.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)
           
 java.lang.String toString()
           
 
Methods inherited from class com.groiss.store.PersistentObject
clone, dbFields, equals, getKey, getOid, getStore, getValue, hashCode, isFilled, onDelete, onInsert, onRead, onUpdate, setFilled, setOid, setStore
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicEvent

public BasicEvent()

BasicEvent

public BasicEvent(java.lang.String name,
                  ActivityInstance raiser,
                  java.lang.Object f,
                  int txType)
Parameters:
name -
raiser -
f -
txType -
Method Detail

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 interface Event

forcedDispatch

public boolean forcedDispatch()
Returns:
the forceDispatch

getContext

public java.lang.Object getContext()
Description copied from interface: Event
returns the context object

Specified by:
getContext in interface Event

getField

public java.lang.Object getField(java.lang.String fname)
                          throws java.lang.NoSuchFieldException,
                                 java.lang.IllegalAccessException
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 interface Event
Throws:
java.lang.NoSuchFieldException
java.lang.IllegalAccessException

getName

public java.lang.String getName()
Description copied from interface: Event
returns the name of the event

Specified by:
getName in interface Event

getRaiseDate

public java.util.Date getRaiseDate()
Description copied from interface: Event
The date and time when the event has been raised.

Specified by:
getRaiseDate in interface Event

getRaiser

public ActivityInstance getRaiser()
Description copied from interface: Event
return the raiser of the event

Specified by:
getRaiser in interface Event

getTableName

public java.lang.String 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 interface Persistent
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.

Specified by:
getTxType in interface Event
Returns:
the txType
See Also:
EventManager.CURRENT_TX, EventManager.NEW_TX

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 interface Event

setForceDispatch

public void setForceDispatch(boolean forceDispatch)
Parameters:
forceDispatch - the forceDispatch to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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

Specified by:
isAbort in interface Event


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.