|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.domain.EventBase
public abstract class EventBase
Base class for all types of events. Contains the event identifier and timestamp.
| Constructor Summary | |
|---|---|
protected |
EventBase()
Initialize a new event. |
| Method Summary | |
|---|---|
protected void |
addMetaData(String key,
Serializable value)
Insert a key-value pair into the meta data of this event. |
boolean |
equals(Object o)
Checks the equality of two events. |
UUID |
getEventIdentifier()
Returns the identifier of this event. |
long |
getEventRevision()
Returns the revision number of this event definition. |
EventMetaData |
getMetaData()
Returns the meta data for this event. |
Serializable |
getMetaDataValue(String key)
Returns the value registered in the meta data under the given key. |
org.joda.time.LocalDateTime |
getTimestamp()
Returns the timestamp of this event. |
int |
hashCode()
|
protected void |
setEventRevision(long eventRevision)
Sets the revision of the implementing event definition. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected EventBase()
| Method Detail |
|---|
public UUID getEventIdentifier()
getEventIdentifier in interface Event
protected final void addMetaData(String key,
Serializable value)
value provided.
Note: this method should *never* be called after an event has been dispatched or stored.
Be careful when using key values with the underscore ( _ ) prefix. They might collide with internal Axon meta
data.
key - The key of the key-value pairvalue - The value to store in the meta datapublic org.joda.time.LocalDateTime getTimestamp()
getTimestamp in interface Eventpublic EventMetaData getMetaData()
getMetaData in interface Eventpublic Serializable getMetaDataValue(String key)
key. If no value is known for the
given key, this method returns null.
getMetaDataValue in interface Eventkey - The key of the meta data entry
null if the key wasn't foundpublic boolean equals(Object o)
equals in class Objecto - the object to compare this event to
true if o is equal to this event instancepublic int hashCode()
hashCode in class Objectprotected void setEventRevision(long eventRevision)
UpCasters to decide which transformations to apply when deserializing
an event. Revision numbers only need to be supplied if the structure has been changed in such a way that the
event serializer cannot deserialize it without help from an UpCaster.
eventRevision - The revision of the event definitionpublic long getEventRevision()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||