SimplestMapper

The simplest variant of CRUDMapper where the only data model is the entity, which is also a CRUDDTOMapper

Parameters

I

Id type of the data

E

Entity type of the data which is a SimplestEntity

Functions

Link copied to clipboard
open override fun createDTOToCreateModel(createDTO: E): E

Mapper to convert given create DTO to a create model

Link copied to clipboard
open override fun entityToBeCreatedFrom(createModel: E, now: Instant): E

Mapper to convert given model into an entity to be created

Link copied to clipboard
open override fun entityToModel(entity: E): E

Mapper to convert from given entity to model

Link copied to clipboard
open override fun modelToDTO(model: E): E

Mapper to convert from model to DTO

Link copied to clipboard
open override fun updateDTOToUpdateModel(updateDTO: E): E

Mapper to convert given update DTO to a update model

Inherited functions

Link copied to clipboard
abstract fun updateEntityWith(entity: E, updateModel: E)

Applies updates contained in given update model to given entity