MutableDomainEventRecord

class MutableDomainEventRecord(val actual: ObjectNode, actualAggregateId: AggregateId, actualHeader: Header, val version: Int, val ownerId: String, val spaceId: SpaceId, val commandId: String, val sequence: Int, val isLast: Boolean, val createTime: Long) : DomainEventRecord

Mutable wrapper for domain event records.

This class provides a mutable interface to domain event records stored as Jackson ObjectNode instances. It allows modification of event properties during the upgrading process.

Parameters

actualAggregateId

The aggregate identifier represented by the record

actualHeader

The message header represented by the record

See also

Constructors

Link copied to clipboard
constructor(actual: ObjectNode, actualAggregateId: AggregateId, actualHeader: Header, version: Int, ownerId: String, spaceId: SpaceId, commandId: String, sequence: Int, isLast: Boolean, createTime: Long)

Creates a new MutableDomainEventRecord wrapping the given ObjectNode

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val actual: ObjectNode

The underlying ObjectNode containing the event data

Link copied to clipboard
open override val aggregateId: String
Link copied to clipboard
open override val aggregateName: String
Link copied to clipboard
open override var body: ObjectNode

The body of the event as an ObjectNode, mutable for upgrading.

Link copied to clipboard
open override var bodyType: String

The body type of the event, mutable for upgrading.

Link copied to clipboard
open override val commandId: String

The command identifier

Link copied to clipboard
open override val contextName: String
Link copied to clipboard
open override val createTime: Long

The event creation timestamp

Link copied to clipboard
open val header: ObjectNode
Link copied to clipboard
open val id: String
Link copied to clipboard
open override val isLast: Boolean

Whether this is the last event in the stream

Link copied to clipboard
open override var name: String

The name of the event, mutable for upgrading.

Link copied to clipboard
open override val ownerId: String

The owner identifier

Link copied to clipboard
open override var revision: String

The revision of the event, mutable for upgrading.

Link copied to clipboard
open override val sequence: Int

The event sequence

Link copied to clipboard
open override val spaceId: SpaceId

The space identifier

Link copied to clipboard
open override val tenantId: String
Link copied to clipboard
open override val version: Int

The aggregate version

Functions

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
Link copied to clipboard
open override fun toAggregateId(): AggregateId
Link copied to clipboard
Link copied to clipboard

Converts a domain event record to a dropped event record.

Link copied to clipboard
Link copied to clipboard
open override fun toMessageHeader(): Header
Link copied to clipboard

Extension function to convert a DomainEventRecord to a MutableDomainEventRecord.