Class AggregateEventEntry

java.lang.Object
org.axonframework.eventsourcing.eventstore.jpa.AggregateEventEntry

@Entity public class AggregateEventEntry extends Object
A JPA entry dedicated for storing EventMessages in the AggregateBasedJpaEventStorageEngine.
Since:
5.0.0
Author:
Steven van Beelen
  • Constructor Details

    • AggregateEventEntry

      public AggregateEventEntry(@Nonnull String identifier, @Nonnull String type, @Nonnull String version, @Nonnull byte[] payload, @Nonnull byte[] metadata, @Nonnull Object timestamp, @Nullable String aggregateType, @Nullable String aggregateIdentifier, @Nullable Long aggregateSequenceNumber)
      Constructor for a AggregateEventEntry when appending events, since the globalIndex() will be defined by the storage layer.
      Parameters:
      identifier - The identifier of the EventMessage.
      type - The MessageType.name() of an Message.type().
      version - The MessageType.version() of an Message.type().
      payload - The Message.payload() as a byte[].
      metadata - The Message.metadata() as a byte[].
      timestamp - The time at which the EventMessage was originally created.
      aggregateType - The type of the aggregate that published this EventMessage. May be null if the event does not originate from an aggregate.
      aggregateIdentifier - The identifier of the aggregate that published this EventMessage. May be null if the event does not originate from an aggregate.
      aggregateSequenceNumber - The sequence number of the EventMessage in the aggregate. May be null if the event does not originate from an aggregate.
    • AggregateEventEntry

      public AggregateEventEntry(long globalIndex, @Nonnull String identifier, @Nonnull String type, @Nonnull String version, @Nonnull byte[] payload, @Nonnull byte[] metadata, @Nonnull String timestamp, @Nullable String aggregateType, @Nullable String aggregateIdentifier, @Nullable Long aggregateSequenceNumber)
      Constructor for an AggregateEventEntry when reading events, since all parameters should be given.
      Parameters:
      globalIndex - The position of the EventMessage in the event store.
      identifier - The identifier of the EventMessage.
      type - The MessageType.name() of an Message.type().
      version - The MessageType.version() of an Message.type().
      payload - The Message.payload() as a byte[].
      metadata - The Message.metadata() as a byte[].
      timestamp - The time at which the EventMessage was originally created.
      aggregateType - The type of the aggregate that published this EventMessage. May be null if the event does not originate from an aggregate.
      aggregateIdentifier - The identifier of the aggregate that published this EventMessage. May be null if the event does not originate from an aggregate.
      aggregateSequenceNumber - The sequence number of the EventMessage in the aggregate. May be null if the event does not originate from an aggregate.
    • AggregateEventEntry

      protected AggregateEventEntry()
      Default constructor required by JPA.
  • Method Details