Class EntityMissingForInstanceCommandHandlerException

All Implemented Interfaces:
Serializable

public class EntityMissingForInstanceCommandHandlerException extends EntityNotFoundException
Exception indicating that an instance command handler was invoked for an entity that does not exist.

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

This is a specialization of EntityNotFoundException: no business identifier is available at this level, so EntityNotFoundException.identifier() returns the Message.type() of the command being handled instead.

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

    • EntityMissingForInstanceCommandHandlerException

      public EntityMissingForInstanceCommandHandlerException(CommandMessage command)
      Creates a new exception with the given command.
      Parameters:
      command - The CommandMessage that was handled.