DefaultAggregateId
Represents a default implementation of AggregateId, which uniquely identifies an aggregate instance within a bounded context.
This data class provides a concrete implementation of the AggregateId interface, encapsulating the necessary information to identify an aggregate: the named aggregate, the instance ID, and the tenant ID.
Constructors
Creates a new DefaultAggregateId with the specified named aggregate, ID, and optional tenant ID.
Properties
The NamedAggregate that this ID belongs to, defining the context and aggregate names.
The tenant identifier as a string, defaults to TenantId.DEFAULT_TENANT_ID for single-tenant scenarios.
Functions
Creates an AggregateId for this NamedAggregate with the specified parameters.
Finds the aggregate type class associated with this named aggregate.
Converts this NamedAggregate to its corresponding AggregateMetadata.
Generates a unique ID string for this NamedAggregate.
Gets the context alias prefix for this bounded context.
Checks if the named aggregate is available locally at runtime.
Materializes this NamedAggregate into a MaterializedNamedAggregate.
Finds the aggregate type class associated with this named aggregate, throwing an exception if not found.
Extension function to convert a NamedAggregate to an EventNamedAggregate.
Converts this NamedAggregate to its string representation.
Converts this NamedAggregate to a string representation using the context alias.