public class EventEntry extends Object implements DomainEventData<Object>
Constructor and Description |
---|
EventEntry(org.bson.Document dbObject,
EventEntryConfiguration configuration)
Creates a new EventEntry based on data provided by Mongo.
|
EventEntry(DomainEventMessage<?> event,
Serializer serializer)
Constructor used to create a new event entry to store in Mongo.
|
Modifier and Type | Method and Description |
---|---|
org.bson.Document |
asDocument(EventEntryConfiguration configuration)
Returns the current entry as a mongo Document.
|
String |
getAggregateIdentifier()
Returns the Identifier of the Aggregate to which the Event was applied.
|
String |
getEventIdentifier()
Returns the identifier of the serialized event.
|
SerializedObject<Object> |
getMetaData()
Returns the serialized data of the MetaData of the serialized Event.
|
SerializedObject<Object> |
getPayload()
Returns the serialized data of the Event Message's payload.
|
long |
getSequenceNumber()
Returns the sequence number of the event in the aggregate.
|
Instant |
getTimestamp()
Returns the timestamp at which the event was first created.
|
String |
getType()
Returns the type identifier of the aggregate.
|
public EventEntry(DomainEventMessage<?> event, Serializer serializer)
event
- The actual DomainEvent to storeserializer
- Serializer to use for the event to storepublic EventEntry(org.bson.Document dbObject, EventEntryConfiguration configuration)
dbObject
- Mongo object that contains data to represent an EventEntryconfiguration
- Configuration containing the property namespublic org.bson.Document asDocument(EventEntryConfiguration configuration)
configuration
- The configuration describing property namespublic String getType()
DomainEventData
getType
in interface DomainEventData<Object>
public String getAggregateIdentifier()
DomainEventData
getAggregateIdentifier
in interface DomainEventData<Object>
public long getSequenceNumber()
DomainEventData
getSequenceNumber
in interface DomainEventData<Object>
public String getEventIdentifier()
EventData
getEventIdentifier
in interface EventData<Object>
public Instant getTimestamp()
EventData
getTimestamp
in interface EventData<Object>
public SerializedObject<Object> getMetaData()
EventData
getMetaData
in interface EventData<Object>
public SerializedObject<Object> getPayload()
EventData
getPayload
in interface EventData<Object>
Copyright © 2010–2017. All rights reserved.