@RequestMapping(value = "/update.action", method = RequestMethod.POST) @ResponseBody public Map<String, Object> update(AidrCollection collection) throws Exception { logger.info("Updating AidrCollection into Database having id " + collection.getId()); try { AidrCollection dbCollection = collectionService.findById(collection.getId()); collection.setStartDate(dbCollection.getStartDate()); collection.setUser(dbCollection.getUser()); collection.setCreatedDate(dbCollection.getCreatedDate()); collectionService.update(collection); return getUIWrapper(true); } catch (Exception e) { logger.error("Error while Updating AidrCollection Info into database", e); return getUIWrapper(false); } }