org.axonframework.quickstart.handler
Class ToDoItem
java.lang.Object
org.axonframework.domain.AbstractAggregateRoot<I>
org.axonframework.eventsourcing.AbstractEventSourcedAggregateRoot
org.axonframework.quickstart.handler.ToDoItem
- All Implemented Interfaces:
- Serializable, AggregateRoot, EventSourcedAggregateRoot
public class ToDoItem
- extends AbstractEventSourcedAggregateRoot
- Author:
- Jettro Coenradie
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ToDoItem
public ToDoItem()
ToDoItem
public ToDoItem(String id,
String description)
markCompleted
public void markCompleted()
getChildEntities
protected Iterable<? extends 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
- Returns:
- a list of event sourced entities contained in this aggregate
handle
protected void handle(DomainEventMessage eventMessage)
- Description copied from class:
AbstractEventSourcedAggregateRoot
- Apply state changes based on the given event.
Note: Implementations of this method should *not* perform validation.
- Specified by:
handle
in class AbstractEventSourcedAggregateRoot
- Parameters:
eventMessage
- The event to handle
getIdentifier
public Object getIdentifier()
- Description copied from interface:
AggregateRoot
- Returns the identifier of this aggregate.
- Returns:
- the identifier of this aggregate
Copyright © 2010-2016. All Rights Reserved.