Class AbstractRestController<ENTITY extends io.github.astrapi69.data.identifiable.Identifiable<ID>,ID extends Serializable,REPOSITORY extends org.springframework.data.jpa.repository.JpaRepository<ENTITY,ID>,DTO>

java.lang.Object
io.github.astrapi69.spring.controller.AbstractRestController<ENTITY,ID,REPOSITORY,DTO>

public class AbstractRestController<ENTITY extends io.github.astrapi69.data.identifiable.Identifiable<ID>,ID extends Serializable,REPOSITORY extends org.springframework.data.jpa.repository.JpaRepository<ENTITY,ID>,DTO> extends Object
  • Constructor Details

  • Method Details

    • delete

      @RequestMapping(method=DELETE, consumes="application/json") @ResponseBody public org.springframework.http.ResponseEntity<DTO> delete(@Valid @RequestBody DTO viewModel)
    • deleteById

      @RequestMapping(value="/{id}", method=DELETE) public Map<String,Object> deleteById(@PathVariable ID id)
    • findAll

      @RequestMapping(method=GET) public org.springframework.http.ResponseEntity<Iterable<DTO>> findAll()
    • get

      @RequestMapping(value="/{id}", method=GET, produces="application/json") public org.springframework.http.ResponseEntity<DTO> get(@PathVariable ID id)
    • save

      @RequestMapping(method=POST, consumes="application/json", produces="application/json") @ResponseBody public org.springframework.http.ResponseEntity<DTO> save(@Valid @RequestBody DTO viewModel)
    • update

      @RequestMapping(value="/{id}", method=PUT, consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTO> update(@PathVariable ID id, @Valid @RequestBody DTO json)
    • getMapper

      public io.github.astrapi69.model.mapper.GenericModelMapper<ENTITY,DTO> getMapper()
    • getService

      public GenericService<ENTITY,ID,REPOSITORY> getService()