StateEventData

data class StateEventData<S : Any>(val delegate: DomainEventStream, val state: S, val firstOperator: String = delegate.header.operator.orEmpty(), val firstEventTime: Long = delegate.createTime, val tags: AbacTags = EMPTY_ABAC_TAGS, val deleted: Boolean = false, val ownerId: String = delegate.ownerId, val spaceId: SpaceId = delegate.spaceId) : StateEvent<S> , Decorator<DomainEventStream> , DomainEventStream

Data class implementation of StateEvent that wraps a DomainEventStream with state information.

Parameters

delegate

the domain event stream being wrapped

state

the state of the aggregate

firstOperator

the first operator (default: from delegate header)

firstEventTime

the first event time (default: from delegate)

tags

the ABAC tags associated with the aggregate

deleted

whether the aggregate is deleted (default: false)

ownerId

the owner after sourcing the event stream

spaceId

the space after sourcing the event stream

Type Parameters

S

the type of the state

Constructors

Link copied to clipboard
constructor(delegate: DomainEventStream, state: S, firstOperator: String = delegate.header.operator.orEmpty(), firstEventTime: Long = delegate.createTime, tags: AbacTags = EMPTY_ABAC_TAGS, deleted: Boolean = false, ownerId: String = delegate.ownerId, spaceId: SpaceId = delegate.spaceId)

Properties

Link copied to clipboard
open override val delegate: DomainEventStream
Link copied to clipboard
open override val deleted: Boolean
Link copied to clipboard
open override val firstEventTime: Long
Link copied to clipboard
open override val firstOperator: String
Link copied to clipboard
open override val ownerId: String
Link copied to clipboard
open override val spaceId: SpaceId
Link copied to clipboard
open override val state: S
Link copied to clipboard
open override val tags: AbacTags

Functions

Link copied to clipboard
open override fun copy(): StateEvent<S>

Creates a copy of this StateEventData with a copied delegate.