SimpleEntity

abstract class SimpleEntity<I : Serializable, E : SimpleEntity<I, E>>(var id: I?, var version: Int?, var createdAt: Instant?, var updatedAt: Instant?, var deletedAt: Instant?) : CRUDEntity<I, E> (source)

Simple variant of CRUDEntity

Parameters

I

Id type of the data

E

Entity type which is a CRUDEntity, meant to be the exact type extending this class

Constructors

Link copied to clipboard
fun <I : Serializable> SimpleEntity(id: I?, version: Int?, createdAt: Instant?, updatedAt: Instant?, deletedAt: Instant?)

Properties

Link copied to clipboard
open override var createdAt: Instant?

Instant at which this entity is created

Link copied to clipboard
open override var deletedAt: Instant?

Instant at which this entity is logically deleted or null if is not deleted, deleted entities should be treated as if they don't exist at all

Link copied to clipboard
open override var id: I?

Identifier of this entity

Link copied to clipboard
open override var updatedAt: Instant?

Instant at which this entity is last updated

Link copied to clipboard
open override var version: Int?

Version of this entity used in optimistic locking during persistence

Inherited functions

Link copied to clipboard

Marks this entity as deleted at given time, also setting updated at and incrementing its version

Link copied to clipboard

Marks this entity as updated at given time, also incrementing its version