CRUDEntity

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

Base entity of a data model representing its persisted structure

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> CRUDEntity(id: I?, version: Int?, createdAt: Instant?, updatedAt: Instant?, deletedAt: Instant?)

Properties

Link copied to clipboard
open var createdAt: Instant?

Instant at which this entity is created

Link copied to clipboard
open 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 var id: I?

Identifier of this entity

Link copied to clipboard
open var updatedAt: Instant?

Instant at which this entity is last updated

Link copied to clipboard
open var version: Int?

Version of this entity used in optimistic locking during persistence

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard