SimpleMapper

Simple variant of CRUDMapper where create/update models are just models, which is also a CRUDDTOMapper

Parameters

I

Id type of the entity

E

Entity type of the data which is a SimpleEntity

M

Model type of the data which is a SimpleModel

D

DTO type of the data which is a SimpleDTO

Inherited functions

Link copied to clipboard
abstract fun createDTOToCreateModel(createDTO: D, parameters: Parameters): M

Mapper to convert given create DTO to a create model

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

Mapper to convert given model into an entity to be created

Link copied to clipboard
abstract fun entityToModel(entity: E): M

Mapper to convert from given entity to model

Link copied to clipboard
abstract fun modelToDTO(model: M, parameters: Parameters): D

Mapper to convert from model to DTO

Link copied to clipboard
abstract fun updateDTOToUpdateModel(updateDTO: D, parameters: Parameters): M

Mapper to convert given update DTO to a update model

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

Applies updates contained in given update model to given entity