Class EntityAlreadyExistsForCreationalCommandHandlerException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.modelling.entity.EntityAlreadyExistsForCreationalCommandHandlerException
All Implemented Interfaces:
Serializable

public class EntityAlreadyExistsForCreationalCommandHandlerException extends RuntimeException
Exception indicating that a creational command handler was invoked for an entity that already exists.

If this command is valid for instances of the entity, as well as creational commands, an instance command can be defined for the same Message.type().

Since:
5.0.0
Author:
Mitchell Herrijgers
See Also:
  • Constructor Details

    • EntityAlreadyExistsForCreationalCommandHandlerException

      public EntityAlreadyExistsForCreationalCommandHandlerException(@Nonnull CommandMessage command, @Nonnull Object existingEntity)
      Creates a new exception with the given command and existingEntity.
      Parameters:
      command - The CommandMessage that was handled.
      existingEntity - The existing entity that was found.