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()
UpcastingContext
getMessageIdentifier
in interface UpcastingContext
public Object getAggregateIdentifier()
UpcastingContext
null
if the object being upcast was not contained in a DomainEventMessage.getAggregateIdentifier
in interface UpcastingContext
null
if not applicablepublic Long getSequenceNumber()
UpcastingContext
null
if the message wrapping the
object being upcast does not contain a sequence number.getSequenceNumber
in interface UpcastingContext
public org.joda.time.DateTime getTimestamp()
UpcastingContext
null
if the object being
upcastgetTimestamp
in interface UpcastingContext
public MetaData getMetaData()
UpcastingContext
null
.getMetaData
in interface UpcastingContext
public LazyDeserializingObject<MetaData> getSerializedMetaData()
Copyright © 2010-2014. All Rights Reserved.