org.axonframework.eventsourcing
Interface EventSourcedAggregateRoot<I>

Type Parameters:
I - The type of the identifier of this aggregate
All Superinterfaces:
AggregateRoot<I>
All Known Implementing Classes:
AbstractAnnotatedAggregateRoot, AbstractEventSourcedAggregateRoot, ToDoItem, ToDoItem

public interface EventSourcedAggregateRoot<I>
extends AggregateRoot<I>

Aggregate that can be initialized using a DomainEventStream. Aggregates that are initialized using Event Sourcing should implement this interface.

Since:
0.3
Author:
Allard Buijze
See Also:
EventSourcingRepository

Method Summary
 void initializeState(DomainEventStream domainEventStream)
          Initialize the state of this aggregate using the events in the provided DomainEventStream.
 
Methods inherited from interface org.axonframework.domain.AggregateRoot
addEventRegistrationCallback, commitEvents, getIdentifier, getUncommittedEventCount, getUncommittedEvents, getVersion, isDeleted
 

Method Detail

initializeState

void initializeState(DomainEventStream domainEventStream)
Initialize the state of this aggregate using the events in the provided DomainEventStream. A call to this method on an aggregate that has already been initialized will result in an IllegalStateException.

Parameters:
domainEventStream - the event stream containing the events that describe the state changes of this aggregate
Throws:
IllegalStateException - if this aggregate was already initialized.


Copyright © 2010-2016. All Rights Reserved.