CRUDService
abstract class CRUDService<I : Serializable, E : CRUDEntity<I>, out M : CRUDModel<I>, in CM : CRUDCreateModel, in UM : CRUDUpdateModel, out R : CRUDRepository<I, E>, out Mapper : CRUDMapper<I, E, M, CM, UM>>(typeName: String, instantProvider: InstantProvider, crudRepository: CRUDRepository<I, E>, mapper: Mapper)(source)
Base implementation of a CRUD service for business layer
This is meant to be extended from a @Service class.
Parameters
I
Id type of the data
M
Model type of the data which is a CRUDModel
E
Entity type of the data which is a CRUDEntity
CM
Create model type of the data which is a CRUDCreateModel
UM
Update model type of the data which is a CRUDUpdateModel
R
Repository type of the data which is a CRUDRepository
Mapper
Mapper type of the data which is a CRUDMapper
crud Repository
Repository dependency of this service which is a CRUDRepository as a base type, private by choice because there is repository to access it with the more specific type instead of the base type
Constructors
Link copied to clipboard
fun <I : Serializable, E : CRUDEntity<I>, out Mapper : CRUDMapper<I, E, M, CM, UM>> CRUDService(typeName: String, instantProvider: InstantProvider, crudRepository: CRUDRepository<I, E>, mapper: Mapper)