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 data
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
R - Repository type of the data which is a SimpleRepository
S - Service type of the data which is a SimpleService

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.

  • Constructor Details

    • SimpleController

      protected SimpleController(String type, S service)
      Constructor to provide type name and dependencies to this controller
      Parameters:
      type - Type name of the data this controller manages
      service - Service dependency of this controller