Package-level declarations

Types

Link copied to clipboard

Defines an aggregate root identifier that inherits multiple interfaces to support various functional requirements. As an identifier, it not only identifies the aggregate root but also supports naming, decorator pattern, tenant identification, and value comparison.

Link copied to clipboard

Interface defining the contract for entities that have aggregate ID capability. An aggregate ID is used to uniquely identify an aggregate, which is a cluster of related entities and value objects treated as a single unit. In Domain-Driven Design (DDD), aggregates are the basic units for maintaining data consistency.

Link copied to clipboard

Interface for entities that have an aggregate name.

Link copied to clipboard

Interface for entities that track their creation time.

Link copied to clipboard
interface DeletedCapable

Interface for entities that can be marked as deleted (soft deletion).

Link copied to clipboard
interface EventIdCapable

Interface for entities that track the ID of their last processed event.

Link copied to clipboard

Interface for entities that track the timestamp of their last processed event.

Link copied to clipboard

Interface for entities that track the timestamp of their first processed event.

Link copied to clipboard

Interface for entities that track the identity of their first operator.

Link copied to clipboard

Interface for objects that can materialize their state into a different representation.

Link copied to clipboard

Represents an aggregate with a unique name within a specific bounded context. It inherits from NamedBoundedContext to get the context name and additionally defines the aggregate name.

Link copied to clipboard

Decorator interface for named aggregates following the decorator pattern. It inherits from NamedAggregate and delegates to the actual named aggregate implementation. This interface allows adding functionality dynamically without modifying the original aggregate logic.

Link copied to clipboard

Interface combining named aggregate capabilities with type information.

Link copied to clipboard
interface OperatorCapable

Interface for entities that track the identity of their last operator.

Link copied to clipboard
interface OwnerId

Interface for identifying the owner of a resource.

Link copied to clipboard

Interface for entities that track when their state was last snapshotted.

Link copied to clipboard
interface StateCapable<S : Any>

Interface for entities that maintain a state of a specific type.

Link copied to clipboard
interface TenantId

Interface defining a property for tenant ID and related operations. Tenant ID is used to distinguish different tenants in a multi-tenant environment.

Link copied to clipboard
interface TypedAggregate<A : Any>

Interface for aggregates that have a specific type.

Functions

Link copied to clipboard

Compares the current AggregateId object for equality with another object. This method provides business logic equality comparison for AggregateId objects, comparing all relevant properties rather than just reference equality.

Link copied to clipboard

Calculates a hash value for the AggregateId.

Link copied to clipboard
fun AggregateId.mod(divisor: Int): Int

Calculates the remainder when the ID's hash code is divided by the given divisor.