Class CrudController<Entity,ID,Dto extends DataTransferObject<Entity>,Pageable extends PaginatedListRequest,Repository extends org.springframework.data.jpa.repository.JpaRepository<Entity,ID> & QuerydslFastPagingRepository<Entity,ID>,Service extends CrudService<Entity,ID,Dto,Pageable,Repository>>

java.lang.Object
biz.devstack.springframework.boot.jpa.crud.CrudController<Entity,ID,Dto,Pageable,Repository,Service>

public abstract class CrudController<Entity,ID,Dto extends DataTransferObject<Entity>,Pageable extends PaginatedListRequest,Repository extends org.springframework.data.jpa.repository.JpaRepository<Entity,ID> & QuerydslFastPagingRepository<Entity,ID>,Service extends CrudService<Entity,ID,Dto,Pageable,Repository>> extends Object
  • Constructor Details

    • CrudController

      public CrudController()
  • Method Details

    • getPaginatedList

      @GetMapping("") public PaginatedList<?> getPaginatedList(@Valid Pageable request)
    • create

      @PostMapping("") public Object create(@Valid @RequestBody Dto dto)
    • getById

      @GetMapping("/{id}") public Object getById(@PathVariable ID id)
    • updateById

      @PutMapping("/{id}") @PostMapping("UPDATE_ENTITY") public Object updateById(@PathVariable ID id, @Valid @RequestBody Dto dto)
    • deleteById

      @DeleteMapping("/{id}") @PostMapping("DELETE_ENTITY") public void deleteById(@PathVariable ID id)
    • injectService

      protected abstract Service injectService()
    • buildResponseEntity

      protected abstract Object buildResponseEntity(Entity entity)