SimpleDomainEvent

data class SimpleDomainEvent<T : Any>(val id: String = GlobalIdGenerator.generateAsString(), val header: Header = DefaultHeader.empty(), val body: T, val aggregateId: AggregateId, val version: Int, val sequence: Int = DEFAULT_EVENT_SEQUENCE, val revision: String = DEFAULT_REVISION, val commandId: String, val name: String = body.javaClass.toName(), val isLast: Boolean = true, val createTime: Long = System.currentTimeMillis()) : DomainEvent<T> , NamedAggregate

Constructors

Link copied to clipboard
constructor(id: String = GlobalIdGenerator.generateAsString(), header: Header = DefaultHeader.empty(), body: T, aggregateId: AggregateId, version: Int, sequence: Int = DEFAULT_EVENT_SEQUENCE, revision: String = DEFAULT_REVISION, commandId: String, name: String = body.javaClass.toName(), isLast: Boolean = true, createTime: Long = System.currentTimeMillis())

Properties

Link copied to clipboard
open override val aggregateId: AggregateId
Link copied to clipboard
open override val aggregateName: String
Link copied to clipboard
open override val body: T
Link copied to clipboard
open override val commandId: String
Link copied to clipboard
open override val contextName: String
Link copied to clipboard
open override val createTime: Long
Link copied to clipboard
open override val header: Header
Link copied to clipboard
open override val id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val isLast: Boolean = true
Link copied to clipboard
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val revision: String
Link copied to clipboard
open override val sequence: Int
Link copied to clipboard
open override val version: Int

Functions

Link copied to clipboard
fun NamedAggregate.aggregateId(id: String = generateId(), tenantId: String = TenantId.DEFAULT_TENANT_ID): DefaultAggregateId
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun NamedBoundedContext.getContextAlias(boundedContext: BoundedContext? = MetadataSearcher.metadata.contexts[contextName]): String
Link copied to clipboard
Link copied to clipboard
open override fun isSameAggregateName(other: NamedAggregate): Boolean
Link copied to clipboard
Link copied to clipboard
fun Message<*, *>.match(function: FunctionInfo): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun AggregateIdCapable.toGroupKey(parallelism: Int = DEFAULT_PARALLELISM): Int
Link copied to clipboard
Link copied to clipboard
open fun withHeader(additionalSource: Map<String, String>): DomainEvent<T>
open fun withHeader(key: String, value: String): DomainEvent<T>
Link copied to clipboard