MaterializedNamedAggregate

data class MaterializedNamedAggregate(val contextName: String, val aggregateName: String) : NamedAggregate, Materialized

Represents a materialized named aggregate, providing concrete implementations of context and aggregate names.

This data class implements both NamedAggregate and Materialized, offering a fully resolved representation of an aggregate within a bounded context. It is used when the aggregate names are known at runtime and need to be stored or compared efficiently.

Constructors

Link copied to clipboard
constructor(contextName: String, aggregateName: String)

Creates a new MaterializedNamedAggregate with the specified context and aggregate names.

Properties

Link copied to clipboard
open override val aggregateName: String

The name of the aggregate within the bounded context.

Link copied to clipboard
open override val contextName: String

The name of the bounded context this aggregate belongs to.

Functions

Link copied to clipboard
fun NamedAggregate.aggregateId(id: String = generateId(), tenantId: String = TenantId.DEFAULT_TENANT_ID): DefaultAggregateId

Creates an AggregateId for this NamedAggregate with the specified parameters.

Link copied to clipboard

Finds the aggregate type class associated with this named aggregate.

Link copied to clipboard

Converts this NamedAggregate to its corresponding AggregateMetadata.

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

Generates a unique ID string for this NamedAggregate.

Link copied to clipboard
fun NamedBoundedContext.getContextAlias(boundedContext: BoundedContext? = MetadataSearcher.metadata.contexts[contextName]): String
Link copied to clipboard

Gets the context alias prefix for this bounded context.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Checks if the named aggregate is available locally at runtime.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Finds the aggregate type class associated with this named aggregate, throwing an exception if not found.

Link copied to clipboard

Extension function to convert a NamedAggregate to an EventNamedAggregate.

Link copied to clipboard

Converts this NamedAggregate to its string representation.

Link copied to clipboard

Converts this NamedAggregate to a string representation using the context alias.