Module org.fuin.cqrs4j
Package org.fuin.cqrs4j
Class AbstractCommand.Builder<ID extends org.fuin.ddd4j.ddd.EntityId,TYPE extends AbstractCommand,BUILDER extends AbstractCommand.Builder<ID,TYPE,BUILDER>>
java.lang.Object
org.fuin.cqrs4j.AbstractCommand.Builder<ID,TYPE,BUILDER>
- Type Parameters:
ID- Type of the entity identifier.TYPE- Type of the event.BUILDER- Type of the builder.
- Direct Known Subclasses:
AbstractAggregateCommand.Builder
- Enclosing class:
- AbstractCommand
protected abstract static class AbstractCommand.Builder<ID extends org.fuin.ddd4j.ddd.EntityId,TYPE extends AbstractCommand,BUILDER extends AbstractCommand.Builder<ID,TYPE,BUILDER>>
extends Object
Base class for event builders.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidEnsures that everything is setup for building the object or throws a runtime exception otherwise.protected final voidresetAbstractCommand(TYPE delegate) Sets the internal instance to a new one.
-
Constructor Details
-
Builder
Constructor with event.- Parameters:
delegate- Event to populate with data.
-
-
Method Details
-
ensureBuildableAbstractCommand
protected final void ensureBuildableAbstractCommand()Ensures that everything is setup for building the object or throws a runtime exception otherwise. -
resetAbstractCommand
Sets the internal instance to a new one. This must be called within the build method.- Parameters:
delegate- Delegate to use.
-