SimplestEntity

abstract class SimplestEntity<I : Serializable>(var id: I? = null, var version: Int? = null, var createdAt: Instant? = null, var updatedAt: Instant? = null, var deletedAt: Instant? = null) : CRUDEntity<I> , CRUDModel<I> , CRUDCreateModel, CRUDUpdateModel, CRUDDTO<I> , CRUDCreateDTO, CRUDUpdateDTO(source)

Simpler variant of CRUDEntity which is also a CRUDModel, a CRUDCreateModel, a CRUDUpdateModel, a CRUDDTO, a CRUDCreateDTO and a CRUDUpdateDTO

Parameters

I

Id type of the data

Constructors

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

Properties

Link copied to clipboard
open override var createdAt: Instant? = null

Instant at which this entity is created

Link copied to clipboard
open override var deletedAt: Instant? = null

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? = null

Identifier of this entity

Link copied to clipboard
open override var updatedAt: Instant? = null

Instant at which this entity is last updated

Link copied to clipboard
open override var version: Int? = null

Version of this entity used in optimistic locking during persistence

Functions

Link copied to clipboard
open override fun createdAt(): Instant

Gets the instant at which this model is created

Link copied to clipboard
open override fun deletedAt(): Instant?

Gets the instant at which this model is deleted

Link copied to clipboard
open override fun id(): I

Gets identifier of this model

Link copied to clipboard
open override fun updatedAt(): Instant

Gets the instant at which this model is last updated

Link copied to clipboard
open override fun version(): Int

Gets version of this model