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

    • 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​(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)