Holger's
Java API

com.antelmann.db
Class DBUpdateEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.antelmann.db.DBUpdateEvent
All Implemented Interfaces:
Timed, Serializable
Direct Known Subclasses:
DBVersionedUpdateEvent

public class DBUpdateEvent
extends EventObject
implements Timed

Author:
Holger Antelmann
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Fields inherited from interface com.antelmann.calendar.Timed
COMPARATOR, DATE_EXTRACTOR
 
Constructor Summary
DBUpdateEvent(DBClassStore<?> source, DBClassStore.DBMethod type, Object parameter, long time, Object returnValue)
           
DBUpdateEvent(DBClassStore<?> source, DBClassStore.DBMethod type, Object parameter, long time, Object option, Object returnValue)
           
DBUpdateEvent(DBClassStore<?> source, DBClassStore.DBMethod type, Object parameter, Object returnValue)
           
 
Method Summary
 Object getOption()
          returns an additional option that was stored along with this update.
 Object getParameter()
          returns the parameter that was used for insert, update or delete; the value may be an ID of a DBEntry, the DBEntry itself or a Filter - depending on the type of this event.
 Object getReturnValue()
          return the value that was returned by the store method
 DBClassStore<?> getSource()
          returns the store that updated the database.
 long getTime()
           
 DBClassStore.DBMethod getType()
          indicates whether it was an update, insert or delete
 User getUser()
          returns the user that was associated with the database of the source while this event was created
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBUpdateEvent

public DBUpdateEvent(DBClassStore<?> source,
                     DBClassStore.DBMethod type,
                     Object parameter,
                     Object returnValue)

DBUpdateEvent

public DBUpdateEvent(DBClassStore<?> source,
                     DBClassStore.DBMethod type,
                     Object parameter,
                     long time,
                     Object returnValue)

DBUpdateEvent

public DBUpdateEvent(DBClassStore<?> source,
                     DBClassStore.DBMethod type,
                     Object parameter,
                     long time,
                     Object option,
                     Object returnValue)
Method Detail

getTime

public long getTime()
Specified by:
getTime in interface Timed

toString

public String toString()
Overrides:
toString in class EventObject

getOption

public Object getOption()
returns an additional option that was stored along with this update.

See Also:
RemoteDBUpdateEvent.Option

getUser

public User getUser()
returns the user that was associated with the database of the source while this event was created


getSource

public DBClassStore<?> getSource()
returns the store that updated the database.

Overrides:
getSource in class EventObject

getParameter

public Object getParameter()
returns the parameter that was used for insert, update or delete; the value may be an ID of a DBEntry, the DBEntry itself or a Filter - depending on the type of this event.


getType

public DBClassStore.DBMethod getType()
indicates whether it was an update, insert or delete


getReturnValue

public Object getReturnValue()
return the value that was returned by the store method



(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads