java.lang.Object
org.fuin.ddd4j.ddd.AbstractEvent
org.fuin.cqrs4j.AbstractCommand
- All Implemented Interfaces:
Serializable,Command,org.fuin.ddd4j.ddd.Event
- Direct Known Subclasses:
AbstractAggregateCommand
Base class for all commands.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAbstractCommand.Builder<ID extends org.fuin.ddd4j.ddd.EntityId,TYPE extends AbstractCommand, BUILDER extends AbstractCommand.Builder<ID, TYPE, BUILDER>> Base class for event builders. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AbstractCommand(@NotNull org.fuin.ddd4j.ddd.Event respondTo) Constructor with event this one responds to.AbstractCommand(org.fuin.ddd4j.ddd.EventId correlationId, org.fuin.ddd4j.ddd.EventId causationId) Constructor with optional data. -
Method Summary
Methods inherited from class org.fuin.ddd4j.ddd.AbstractEvent
equals, getCausationId, getCorrelationId, getEventId, getEventTimestamp, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.fuin.ddd4j.ddd.Event
getCausationId, getCorrelationId, getEventId, getEventTimestamp, getEventType
-
Constructor Details
-
AbstractCommand
public AbstractCommand()Default constructor. -
AbstractCommand
public AbstractCommand(@NotNull @NotNull org.fuin.ddd4j.ddd.Event respondTo) Constructor with event this one responds to. Convenience method to set the correlation and causation identifiers correctly.- Parameters:
respondTo- Causing event.
-
AbstractCommand
public AbstractCommand(@Nullable org.fuin.ddd4j.ddd.EventId correlationId, @Nullable org.fuin.ddd4j.ddd.EventId causationId) Constructor with optional data.- Parameters:
correlationId- Correlation ID.causationId- ID of the event that caused this one.
-