Package dev.akif.crud.simple
Class SimpleController<I extends Serializable,E extends SimpleEntity<I,E>,M extends SimpleModel<I,E>,D extends SimpleDTO<I,M,E>,R extends SimpleRepository<I,E>,S extends SimpleService<I,E,M,R>>
java.lang.Object
dev.akif.crud.CRUDController<I,E,M,D,M,M,D,D,R,S>
dev.akif.crud.simple.SimpleController<I,E,M,D,R,S>
- Type Parameters:
I- Id type of the dataE- Entity type of the data which is aSimpleEntityM- Model type of the data which is aSimpleModelD- DTO type of the data which is aSimpleDTOR- Repository type of the data which is aSimpleRepositoryS- Service type of the data which is aSimpleService
public abstract class SimpleController<I extends Serializable,E extends SimpleEntity<I,E>,M extends SimpleModel<I,E>,D extends SimpleDTO<I,M,E>,R extends SimpleRepository<I,E>,S extends SimpleService<I,E,M,R>>
extends CRUDController<I,E,M,D,M,M,D,D,R,S>
Simple variant of
CRUDController where create/update models are just models
and create/update DTOs are just DTOs directly
This is meant to be extended from a @RestController class,
ideally also with a @RequestMapping with some path prefix for the endpoints.
-
Field Summary
Fields inherited from class dev.akif.crud.CRUDController
service, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleController(String type, S service) Constructor to provide type name and dependencies to this controller -
Method Summary
-
Constructor Details
-
SimpleController
Constructor to provide type name and dependencies to this controller- Parameters:
type- Type name of the data this controller managesservice- Service dependency of this controller
-