Interface Aggregate<ID,​AGGREGATE_TYPE extends Aggregate<ID,​AGGREGATE_TYPE>>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ID aggregateId()
      The id of the aggregate (aka.
      dk.cloudcreate.essentials.components.eventsourced.eventstore.postgresql.types.EventOrder eventOrderOfLastRehydratedEvent()
      Get the eventOrder of the last event during aggregate hydration (using the rehydrate(AggregateEventStream) method)
      boolean hasBeenRehydrated()
      Has the aggregate been initialized using previously recorded/persisted events (aka.
      AGGREGATE_TYPE rehydrate​(dk.cloudcreate.essentials.components.eventsourced.eventstore.postgresql.eventstream.AggregateEventStream<ID> persistedEvents)
      Effectively performs a leftFold over all the previously persisted events related to this aggregate instance
    • Method Detail

      • aggregateId

        ID aggregateId()
        The id of the aggregate (aka. the stream-id)
      • hasBeenRehydrated

        boolean hasBeenRehydrated()
        Has the aggregate been initialized using previously recorded/persisted events (aka. historic events) using the rehydrate(AggregateEventStream) method
      • rehydrate

        AGGREGATE_TYPE rehydrate​(dk.cloudcreate.essentials.components.eventsourced.eventstore.postgresql.eventstream.AggregateEventStream<ID> persistedEvents)
        Effectively performs a leftFold over all the previously persisted events related to this aggregate instance
        Parameters:
        persistedEvents - the previous persisted events related to this aggregate instance, aka. the aggregates history
        Returns:
        the same aggregate instance (self)
      • eventOrderOfLastRehydratedEvent

        dk.cloudcreate.essentials.components.eventsourced.eventstore.postgresql.types.EventOrder eventOrderOfLastRehydratedEvent()
        Get the eventOrder of the last event during aggregate hydration (using the rehydrate(AggregateEventStream) method)
        Returns:
        the event order of the last applied Event or EventOrder.NO_EVENTS_PREVIOUSLY_PERSISTED in case no events has ever been applied to the aggregate