org.axonframework.eventstore.jpa
Class DomainEventEntry

java.lang.Object
  extended by org.axonframework.eventstore.jpa.AbstractEventEntryData<byte[]>
      extended by org.axonframework.eventstore.jpa.AbstractEventEntry
          extended by org.axonframework.eventstore.jpa.DomainEventEntry
All Implemented Interfaces:
SerializedDomainEventData<byte[]>

@Entity
public class DomainEventEntry
extends AbstractEventEntry

JPA compliant wrapper around a DomainEvent. It stores a DomainEvent by extracting some of the information needed to base searches on, and stores the DomainEventMessage itself as a serialized object using an Serializer

Since:
0.5
Author:
Allard Buijze

Nested Class Summary
 
Nested classes/interfaces inherited from class org.axonframework.eventstore.jpa.AbstractEventEntryData
AbstractEventEntryData.PK
 
Constructor Summary
protected DomainEventEntry()
          Default constructor, as required by JPA specification.
  DomainEventEntry(String type, DomainEventMessage event, org.joda.time.DateTime dateTime, SerializedObject<byte[]> payload, SerializedObject<byte[]> metaData)
          Initialize an Event entry for the given event.
  DomainEventEntry(String type, DomainEventMessage event, SerializedObject<byte[]> payload, SerializedObject<byte[]> metaData)
          Initialize an Event entry for the given event.
 
Method Summary
 
Methods inherited from class org.axonframework.eventstore.jpa.AbstractEventEntry
getMetaData, getPayload
 
Methods inherited from class org.axonframework.eventstore.jpa.AbstractEventEntryData
getAggregateIdentifier, getEventIdentifier, getPayloadType, getSequenceNumber, getTimestamp, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainEventEntry

protected DomainEventEntry()
Default constructor, as required by JPA specification. Do not use directly!


DomainEventEntry

public DomainEventEntry(String type,
                        DomainEventMessage event,
                        SerializedObject<byte[]> payload,
                        SerializedObject<byte[]> metaData)
Initialize an Event entry for the given event.

Parameters:
type - The type identifier of the aggregate root the event belongs to
event - The event to store in the eventstore
payload - The serialized version of the Event
metaData - The serialized metaData of the Event

DomainEventEntry

public DomainEventEntry(String type,
                        DomainEventMessage event,
                        org.joda.time.DateTime dateTime,
                        SerializedObject<byte[]> payload,
                        SerializedObject<byte[]> metaData)
Initialize an Event entry for the given event.

Parameters:
type - The type identifier of the aggregate root the event belongs to
event - The event to store in the eventstore
dateTime - The timestamp to store in the Event Store
payload - The serialized version of the Event
metaData - The serialized metaData of the Event


Copyright © 2010-2016. All Rights Reserved.