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 Details

    • Builder

      public Builder(TYPE delegate)
      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

      protected final void resetAbstractCommand(TYPE delegate)
      Sets the internal instance to a new one. This must be called within the build method.
      Parameters:
      delegate - Delegate to use.