private Integer routeNumberCheck(String routeNumber) { try { Route route = iRouteService.getRouteByNumber(Integer.parseInt(routeNumber)); if (route == null) { return Integer.parseInt(routeNumber); } } catch (Exception e) { log.log(Level.INFO, "Exception: ", e); } return null; }
@RequestMapping(value = "routeActions.do", method = RequestMethod.GET) public ModelAndView routeAction(@RequestParam(value = ROUTE_NUMBER) String routeNumber) { Route route = iRouteService.getRouteByNumber(Integer.parseInt(routeNumber)); return new ModelAndView(PAGE_ROUTE_ACTIONS, ROUTE, route); }