EntityChange

data class EntityChange(val entityClass: EntityClass<*, Entity<*>>, val entityId: EntityID<*>, val changeType: EntityChangeType, val transactionId: String)

Stores details about a state-change event for an Entity instance.

Constructors

Link copied to clipboard
constructor(entityClass: EntityClass<*, Entity<*>>, entityId: EntityID<*>, changeType: EntityChangeType, transactionId: String)

Properties

Link copied to clipboard

The exact changed state of the event.

Link copied to clipboard

The EntityClass of the changed entity instance.

Link copied to clipboard

The unique EntityID associated with the entity instance.

Link copied to clipboard

The unique id for the R2dbcTransaction in which the event took place.

Functions

Link copied to clipboard
suspend fun <ID : Any, T : Entity<ID>> EntityChange.toEntity(): T?

Returns the actual Entity instance associated with this event, or null if the entity is not found.

suspend fun <ID : Any, T : Entity<ID>> EntityChange.toEntity(klass: EntityClass<ID, T>): T?

Returns the actual Entity instance associated with this event, or null if either its class type is neither equivalent to nor a subclass of klass, or if the entity is not found.