CRUDMapper

Mapper to convert between models and entities

Parameters

I

Id type of the data

E

Entity type of the data which is a CRUDEntity

M

Model type of the data which is a CRUDModel

CM

Create model type of the data which is a CRUDCreateModel

UM

Update model type of the data which is a CRUDUpdateModel

Functions

Link copied to clipboard
abstract fun entityToBeCreatedFrom(createModel: CM, 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 updateEntityWith(entity: E, updateModel: UM)

Applies updates contained in given update model to given entity

Inheritors

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