org.axonframework.eventsourcing.annotation
Class AbstractAnnotatedAggregateRoot<I>
java.lang.Object
org.axonframework.domain.AbstractAggregateRoot<I>
org.axonframework.eventsourcing.AbstractEventSourcedAggregateRoot<I>
org.axonframework.eventsourcing.annotation.AbstractAnnotatedAggregateRoot<I>
- Type Parameters:
I - The type of the identifier of this aggregate
- All Implemented Interfaces:
- Serializable, AggregateRoot<I>, EventSourcedAggregateRoot<I>
@MappedSuperclass
public abstract class AbstractAnnotatedAggregateRoot<I>
- extends AbstractEventSourcedAggregateRoot<I>
Convenience super type for aggregate roots that have their event handler methods annotated with the EventHandler annotation.
Implementations can call the AbstractEventSourcedAggregateRoot.apply(Object) method to have an event applied.
- Since:
- 0.1
- Author:
- Allard Buijze
- See Also:
EventHandler,
Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAnnotatedAggregateRoot
public AbstractAnnotatedAggregateRoot()
handle
protected void handle(DomainEventMessage event)
- Calls the appropriate
EventHandler annotated handler with the
provided event.
- Specified by:
handle in class AbstractEventSourcedAggregateRoot<I>
- Parameters:
event - The event to handle- See Also:
EventHandler
getIdentifier
public I getIdentifier()
- Description copied from interface:
AggregateRoot
- Returns the identifier of this aggregate.
- Returns:
- the identifier of this aggregate
getChildEntities
protected Collection<EventSourcedEntity> getChildEntities()
- Description copied from class:
AbstractEventSourcedAggregateRoot
- Returns a collection of event sourced entities directly referenced by this entity. May return null or an empty
list to indicate no child entities are available. The collection may also contain null values.
Events are propagated to the children in the order that the iterator of the return value provides.
- Specified by:
getChildEntities in class AbstractEventSourcedAggregateRoot<I>
- Returns:
- a list of event sourced entities contained in this aggregate
Copyright © 2010-2012. All Rights Reserved.