CommandMetadata

data class CommandMetadata<C>(val commandType: Class<C>, val namedAggregateGetter: NamedAggregateGetter<C>?, val name: String, val isCreate: Boolean, val allowCreate: Boolean, val isVoid: Boolean, val aggregateIdGetter: PropertyGetter<C, String>?, val tenantIdGetter: PropertyGetter<C, String>?, val ownerIdGetter: PropertyGetter<C, String>?, val aggregateVersionGetter: PropertyGetter<C, Int?>?) : Named, Metadata

Metadata container for command classes.

CommandMetadata holds all the reflective information about a command class, including property getters for aggregate targeting, command characteristics, and naming information. This metadata is used by the command processing pipeline to properly route and handle commands.

Author

ahoo wang

Parameters

C

the type of the command class

See also

Constructors

Link copied to clipboard
constructor(commandType: Class<C>, namedAggregateGetter: NamedAggregateGetter<C>?, name: String, isCreate: Boolean, allowCreate: Boolean, isVoid: Boolean, aggregateIdGetter: PropertyGetter<C, String>?, tenantIdGetter: PropertyGetter<C, String>?, ownerIdGetter: PropertyGetter<C, String>?, aggregateVersionGetter: PropertyGetter<C, Int?>?)

Properties

Link copied to clipboard

property getter for the aggregate ID (can be null for create commands)

Link copied to clipboard

property getter for the expected aggregate version

Link copied to clipboard

whether this command allows creating aggregates if they don't exist

Link copied to clipboard

the Class object representing the command type

Link copied to clipboard

whether this command creates new aggregates

Link copied to clipboard

Whether this command deletes aggregates.

Link copied to clipboard

whether this command returns no result (fire-and-forget)

Link copied to clipboard
open override val name: String

the command name (typically the class name)

Link copied to clipboard

getter for the named aggregate information

Link copied to clipboard

property getter for the owner ID

Link copied to clipboard

The static tenant ID if the tenant ID getter is a static property getter.

Link copied to clipboard

property getter for the tenant ID

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String