public class SerializedDomainEventUpcastingContext extends Object implements UpcastingContext
| Constructor and Description |
|---|
SerializedDomainEventUpcastingContext(SerializedDomainEventData domainEventData,
Serializer serializer)
Initializes the UpcastingContext using given serialized
domainEventData. |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAggregateIdentifier()
Returns the Identifier of the Aggregate to which the Event owning the object to upcast, was applied.
|
String |
getMessageIdentifier()
Returns the identifier of the message wrapping the object to upcast.
|
MetaData |
getMetaData()
Returns the meta data of the message wrapping the object being upcast.
|
Long |
getSequenceNumber()
Returns the sequence number of the event in the aggregate, or
null if the message wrapping the
object being upcast does not contain a sequence number. |
LazyDeserializingObject<MetaData> |
getSerializedMetaData()
Returns the wrapper containing the serialized MetaData.
|
org.joda.time.DateTime |
getTimestamp()
Returns the timestamp at which the event was first created.
|
public SerializedDomainEventUpcastingContext(SerializedDomainEventData domainEventData, Serializer serializer)
domainEventData. Deserialization of the
meta data contained in the domainEventData is done on first access of the meta data.domainEventData - the object containing information about the domain event from which an object is being
upcastserializer - The serializer that can be used to deserialize the meta datapublic String getMessageIdentifier()
UpcastingContextgetMessageIdentifier in interface UpcastingContextpublic Object getAggregateIdentifier()
UpcastingContextnull if the object being upcast was not contained in a DomainEventMessage.getAggregateIdentifier in interface UpcastingContextnull if not applicablepublic Long getSequenceNumber()
UpcastingContextnull if the message wrapping the
object being upcast does not contain a sequence number.getSequenceNumber in interface UpcastingContextpublic org.joda.time.DateTime getTimestamp()
UpcastingContextnull if the object being
upcastgetTimestamp in interface UpcastingContextpublic MetaData getMetaData()
UpcastingContextnull.getMetaData in interface UpcastingContextpublic LazyDeserializingObject<MetaData> getSerializedMetaData()
Copyright © 2010-2014. All Rights Reserved.