@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public ResponseEntity<Boolean> removeCompany(@PathVariable("id") Integer id) { companyService.removeCompany(id); return new ResponseEntity<Boolean>(Boolean.TRUE, HttpStatus.OK); }
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) public Company updateCompany( @PathVariable("id") Integer id, @RequestBody @Valid Company company) { return companyService.saveCompany(company); }
@RequestMapping(method = RequestMethod.GET) public List<Company> getCompanyList() { return companyService.getCompanyList(); }
@RequestMapping(method = RequestMethod.POST) public Company saveCompany(@RequestBody @Valid Company company) { return companyService.saveCompany(company); }
@RequestMapping(value = "/{id}", method = RequestMethod.GET) public Company getCompanyDetail(@PathVariable("id") Integer id) { return companyService.getCompanyDetail(id); }