org.axonframework.eventsourcing
Interface EventSourcedAggregateRoot

All Superinterfaces:
AggregateRoot
All Known Implementing Classes:
AbstractAnnotatedAggregateRoot, AbstractEventSourcedAggregateRoot

public interface EventSourcedAggregateRoot
extends AggregateRoot

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
commitEvents, getIdentifier, getUncommittedEventCount, getUncommittedEvents, getVersion
 

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 © 2011. All Rights Reserved.