SimplestMapper

interface SimplestMapper<I : Serializable, E : SimplestEntity<I, E>> : CRUDMapper<I, E, E, E, E> , CRUDDTOMapper<I, E, E, E, E, E, E> (source)

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 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

Inherited functions

Link copied to clipboard
abstract fun createDTOToCreateModel(createDTO: E): E

Mapper to convert given create DTO to a create model

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

Mapper to convert given model into an entity to be created

Link copied to clipboard
abstract fun updateDTOToUpdateModel(updateDTO: E): E

Mapper to convert given update DTO to a update model

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

Applies updates contained in given update model to given entity