Package models.transit

Examples of models.transit.ServiceCalendar.save()


            cal = mapper.readValue(params.get("body"), ServiceCalendar.class);

            if(Agency.findById(cal.agency.id) == null)
                badRequest();

            cal.save();

            // check if gtfsServiceId is specified, if not create from DB id
            if(cal.gtfsServiceId == null) {
              cal.gtfsServiceId = "CAL_" + cal.id.toString();
                cal.save();
View Full Code Here


            cal.save();

            // check if gtfsServiceId is specified, if not create from DB id
            if(cal.gtfsServiceId == null) {
              cal.gtfsServiceId = "CAL_" + cal.id.toString();
                cal.save();
            }
           

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

            // check if gtfsAgencyId is specified, if not create from DB id
            if(cal.gtfsServiceId == null)
              cal.gtfsServiceId = "CAL_" + cal.id.toString();
           
            ServiceCalendar updatedCal = ServiceCalendar.em().merge(cal);
            updatedCal.save();

            renderJSON(Api.toJson(updatedCal, false));
        } catch (Exception e) {
            e.printStackTrace();
            badRequest();
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.