EntityId

open class EntityId<Id>(val value: Id)

Base value object for entity identifiers.

Wraps a unique identifier of generic type Id and implements value-semantics equality based on the identifier value rather than object reference.

Type Parameters

Id

the type of the underlying identifier (e.g., String, UUID).

Inheritors

Constructors

Link copied to clipboard
constructor(value: Id)

Properties

Link copied to clipboard
open val value: Id

the unique identifier.

Functions

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

Compares two EntityId instances based on their underlying values.

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

Generates a hash code based on the underlying identifier value.