DefaultDeleteAggregateFunction

class DefaultDeleteAggregateFunction<C : Any>(commandAggregate: CommandAggregate<C, *>, afterCommandFunctions: List<AfterCommandFunction<C>>) : InternalCommandFunction<C>

Default implementation of delete aggregate command function.

This function handles the DefaultDeleteAggregate command by generating a DefaultAggregateDeleted event. It provides a standard way to mark aggregates as deleted in the system.

Parameters

commandAggregate

The command aggregate instance this function belongs to.

afterCommandFunctions

List of after-command functions to execute after deletion.

Type Parameters

C

The type of the command aggregate root.

Constructors

Link copied to clipboard
constructor(commandAggregate: CommandAggregate<C, *>, afterCommandFunctions: List<AfterCommandFunction<C>>)

Properties

Link copied to clipboard
open override val supportedType: Class<*>

The class type of message bodies that this function can process. Used to determine if a message is supported by checking if the message body is an instance of this type.

Functions

Link copied to clipboard
open override fun invokeCommand(exchange: ServerCommandExchange<*>): Mono<*>

Invokes the delete command by returning a DefaultAggregateDeleted event.