Package models.transit

Examples of models.transit.Trip.save()


            // if endtime is before start time add a day (e.g 07:00-00:30 becomes 07:00-24:30)
            if(trip != null && trip.useFrequency != null && trip.endTime != null &&  trip.useFrequency  && trip.startTime != null && trip.endTime < trip.startTime) {
              trip.endTime += (24 * 60 * 60 );
            }
           
            trip.save();

            // check if gtfsRouteId is specified, if not create from DB id
            if(trip.gtfsTripId == null) {
                trip.gtfsTripId = "TRIP_" + trip.id.toString();
                trip.save();
View Full Code Here


            trip.save();

            // check if gtfsRouteId is specified, if not create from DB id
            if(trip.gtfsTripId == null) {
                trip.gtfsTripId = "TRIP_" + trip.id.toString();
                trip.save();
            }
           
            if (tripWithStopTimes != null && tripWithStopTimes.stopTimes != null) {
                for (StopTimeWithDeletion stopTime: tripWithStopTimes.stopTimes) {
                    stopTime.trip = trip;
View Full Code Here

                    updatedStopTime.trip = updatedTrip;
                    updatedStopTime.save();
                }
            }
           
            updatedTrip.save();

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

                 trip.tripHeadsign = csvLine[3];
                 trip.tripShortName = csvLine[4];
                
                 trip.useFrequency = false;
                
                 trip.save();
                
                 Integer firstTimepoint = null;
                 Integer columnCount = 0;
                 Integer previousTime = 0;
                 Integer dayOffset = 0;
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.