@RequestMapping(value="/{urid}",method=RequestMethod.DELETE) @ResponseBody public RestWrapper delete(@PathVariable("urid") Integer userRoleId,Principal principal){
  RestWrapper restWrapper=null;
  try {
    userRolesDAO.delete(userRoleId);
    restWrapper=new RestWrapper(null,RestWrapper.OK);
    LOGGER.info("Record with ID:" + userRoleId + " deleted from UserRoles by User:"+ principal.getName());
  }
 catch (  Exception e) {
    LOGGER.error(e);
    restWrapper=new RestWrapper(e.getMessage(),RestWrapper.ERROR);
  }
  return restWrapper;
}

@ RequestMapping ( value = "/{urid}" , method = RequestMethod . DELETE ) @ ResponseBody public RestWrapper delete ( @ PathVariable ( "urid" ) Integer userRoleId , Principal principal ) { RestWrapper restWrapper = null ; try { userRolesDAO . delete ( userRoleId ) ; restWrapper = new RestWrapper ( null , RestWrapper . OK ) ; LOGGER . info ( "Record with ID:" + userRoleId + " deleted from UserRoles by User:" + principal . getName ( ) ) ; } catch ( Exception e ) { LOGGER . error ( e ) ; restWrapper = new RestWrapper ( e . getMessage ( ) , RestWrapper . ERROR ) ; } return restWrapper ; }
this method calls the proc deleteuserroles and deletes a record corresponding to the id passed .
