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


  • public class AbstractRestController<ENTITY extends io.github.astrapi69.data.identifiable.Identifiable<ID>,​ID extends java.io.Serializable,​REPOSITORY extends org.springframework.data.jpa.repository.JpaRepository<ENTITY,​ID>,​DTO>
    extends java.lang.Object
    • Method Detail

      • 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 java.util.Map<java.lang.String,​java.lang.Object> deleteById​(@PathVariable
                                                                                 ID id)
      • findAll

        @RequestMapping(method=GET)
        public org.springframework.http.ResponseEntity<java.lang.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.bean.mapper.GenericModelMapper<ENTITY,​DTO> getMapper()