@RequestMapping(value="/{id}",method=RequestMethod.DELETE) @ResponseBody public RestWrapper delete(@PathVariable("id") Long batchId,Principal principal){
  RestWrapper restWrapper=null;
  try {
    File file=new File();
    file.setBatchId(batchId);
    fileDAO.delete(batchId);
    restWrapper=new RestWrapper(null,RestWrapper.OK);
    LOGGER.info("Record with ID:" + batchId + " deleted from File by User:"+ principal.getName());
  }
 catch (  MetadataException e) {
    LOGGER.error(e);
    restWrapper=new RestWrapper(e.getMessage(),RestWrapper.ERROR);
  }
  return restWrapper;
}

@ RequestMapping ( value = "/{id}" , method = RequestMethod . DELETE ) @ ResponseBody public RestWrapper delete ( @ PathVariable ( "id" ) Long batchId , Principal principal ) { RestWrapper restWrapper = null ; try { File file = new File ( ) ; file . setBatchId ( batchId ) ; fileDAO . delete ( batchId ) ; restWrapper = new RestWrapper ( null , RestWrapper . OK ) ; LOGGER . info ( "Record with ID:" + batchId + " deleted from File by User:" + principal . getName ( ) ) ; } catch ( MetadataException e ) { LOGGER . error ( e ) ; restWrapper = new RestWrapper ( e . getMessage ( ) , RestWrapper . ERROR ) ; } return restWrapper ; }
this method calls proc deletefile and deletes a record corresponding to batchid passed .
