Package models.transit

Examples of models.transit.RouteType.save()


      RouteType routeType;

        try {
            routeType = mapper.readValue(params.get("body"), RouteType.class);

            routeType.save();
            renderJSON(Api.toJson(routeType, false));
        } catch (Exception e) {
            e.printStackTrace();
            badRequest();
        }
View Full Code Here


            if(routeType.id == null ||RouteType.findById(routeType.id) == null)
                badRequest();

       
            RouteType updatedRouteType = RouteType.em().merge(routeType);
            updatedRouteType.save();

            renderJSON(Api.toJson(updatedRouteType, false));
        } catch (Exception e) {
            e.printStackTrace();
            badRequest();
View Full Code Here

      else {
       
        routeType = new RouteType();
        routeType.gtfsRouteType = type;
        routeType.description = type.name();
        routeType.save();
       
        return routeType;
      }   
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.