org.axonframework.upcasting
Interface UpcastingContext

All Known Implementing Classes:
SerializedDomainEventUpcastingContext

public interface UpcastingContext

Interface describing an object that provides contextual information about the object being upcast. Generally, this is information about the Message containing the object to upcast.

Since:
2.0
Author:
Allard Buijze

Method Summary
 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.
 org.joda.time.DateTime getTimestamp()
          Returns the timestamp at which the event was first created.
 

Method Detail

getMessageIdentifier

String getMessageIdentifier()
Returns the identifier of the message wrapping the object to upcast.

Returns:
the identifier of the message wrapping the object to upcast, if available

getAggregateIdentifier

Object getAggregateIdentifier()
Returns the Identifier of the Aggregate to which the Event owning the object to upcast, was applied. This will return null if the object being upcast was not contained in a DomainEventMessage.

Returns:
the Identifier of the Aggregate to which the Event was applied, or null if not applicable

getSequenceNumber

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.

Returns:
the sequence number of the event in the aggregate, if available

getTimestamp

org.joda.time.DateTime getTimestamp()
Returns the timestamp at which the event was first created. Will return null if the object being upcast

Returns:
the timestamp at which the event was first created, if available

getMetaData

MetaData getMetaData()
Returns the meta data of the message wrapping the object being upcast. If the meta data is not available, or is in fact the subject of being upcast itself, this method returns null.

Returns:
the MetaData of the message wrapping the object to upcast, if available


Copyright © 2010-2016. All Rights Reserved.