MediumMaterializedSnapshot

data class MediumMaterializedSnapshot<S : Any>(val tenantId: String, val ownerId: String = OwnerId.DEFAULT_OWNER_ID, val spaceId: SpaceId = SpaceIdCapable.DEFAULT_SPACE_ID, val version: Int, val eventId: String, val firstOperator: String, val operator: String, val firstEventTime: Long, val eventTime: Long, val state: S, val tags: AbacTags = EMPTY_ABAC_TAGS) : IMaterializedSnapshot<MediumMaterializedSnapshot<S>, S> , TenantId, OwnerId, SpaceIdCapable, Version, EventIdCapable, FirstOperatorCapable, OperatorCapable, FirstEventTimeCapable, EventTimeCapable, AbacTaggable

Represents a materialized snapshot for medium data, implementing multiple capabilities through inheritance. This class is designed to be generic, capable of holding state data of any type. Each snapshot corresponds to a specific version of the state within a tenant and owner context, and records information such as event IDs and operation times to support tracing and auditing.

Type Parameters

S

The type of the state data.

Constructors

Link copied to clipboard
constructor(tenantId: String, ownerId: String = OwnerId.DEFAULT_OWNER_ID, spaceId: SpaceId = SpaceIdCapable.DEFAULT_SPACE_ID, version: Int, eventId: String, firstOperator: String, operator: String, firstEventTime: Long, eventTime: Long, state: S, tags: AbacTags = EMPTY_ABAC_TAGS)

Properties

Link copied to clipboard
open override val eventId: String

The ID of the event that triggered the creation of this snapshot.

Link copied to clipboard
open override val eventTime: Long

The timestamp of the last event, marking the last update time of the state.

Link copied to clipboard
open override val firstEventTime: Long

The timestamp of the first event, marking the beginning of the state's history.

Link copied to clipboard
open override val firstOperator: String

The first operator who performed an operation on the state.

Link copied to clipboard

Whether the entity has been initialized.

Link copied to clipboard

Whether the entity is at its initial version.

Link copied to clipboard
open override val operator: String

The operator who last performed an operation on the state.

Link copied to clipboard
open override val ownerId: String

Identifier for the owner of the snapshot, usually representing the creator or responsible person.

Link copied to clipboard
open override val spaceId: SpaceId

Identifier for the space containing the snapshot.

Link copied to clipboard
open override val state: S

The actual state data, its type is generic, allowing for different types of state data.

Link copied to clipboard
open override val tags: AbacTags

The ABAC tags associated with the snapshot.

Link copied to clipboard
open override val tenantId: String

Identifier for the tenant to which the snapshot belongs, used for multi-tenant differentiation.

Link copied to clipboard
open override val version: Int

The version number of the snapshot, used to track changes over time.

Functions

Link copied to clipboard
open override fun withState(state: S): MediumMaterializedSnapshot<S>

Creates a new snapshot with the specified state.