@MappedSuperclass public abstract class AbstractDomainEventEntry<T> extends AbstractEventEntry<T> implements DomainEventData<T>
|Modifier||Constructor and Description|
Default constructor required by JPA
Construct a new event entry from a published domain event message to enable storing the event or sending it to a remote location.
Reconstruct an event entry from a stored object.
|Modifier and Type||Method and Description|
Returns the Identifier of the Aggregate to which the Event was applied.
Returns the sequence number of the event in the aggregate.
Returns the type identifier of the aggregate.
getEventIdentifier, getMetaData, getPayload, getTimestamp
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AbstractDomainEventEntry(DomainEventMessage<?> eventMessage, Serializer serializer, Class<T> contentType)
serializer will be used to serialize the payload and metadata in the given
The type of the serialized data will be the same as the given
eventMessage- The event message to convert to a serialized event entry
serializer- The serializer to convert the event
contentType- The data type of the payload and metadata after serialization
public AbstractDomainEventEntry(String type, String aggregateIdentifier, long sequenceNumber, String eventIdentifier, Object timestamp, String payloadType, String payloadRevision, T payload, T metaData)
type- The type of aggregate that published this event
aggregateIdentifier- The identifier of the aggregate that published this event
sequenceNumber- The sequence number of the event in the aggregate
eventIdentifier- The identifier of the event
timestamp- The time at which the event was originally created
payloadType- The fully qualified class name or alias of the event payload
payloadRevision- The revision of the event payload
payload- The serialized payload
metaData- The serialized metadata
public String getType()
public String getAggregateIdentifier()
Copyright © 2010–2021. All rights reserved.