Package models.transit

Examples of models.transit.Agency.save()


        for (org.onebusaway.gtfs.model.Agency gtfsAgency : reader.getAgencies()) {
         
          if(!agencyIdMap.containsKey(gtfsAgency.getId()))
          {
            Agency agency = new Agency(gtfsAgency);
            agency.save();
           
            agencyIdMap.put(agency.gtfsAgencyId, BigInteger.valueOf(agency.id));
           
            primaryAgencyId = BigInteger.valueOf(agency.id);
           
View Full Code Here


        Logger.info("Center: " + centroid.getCoordinate().y + ", " + centroid.getCoordinate().x);
         
        primaryAgency.defaultLat = centroid.getCoordinate().y;
        primaryAgency.defaultLon = centroid.getCoordinate().x;
       
        primaryAgency.save();
       
          GtfsSnapshotMergeTask tripShapeTask = new GtfsSnapshotMergeTask(snapshotMerge);
          tripShapeTask.startTask();
         
          // import points
View Full Code Here

    public static void createAgency() {
        Agency agency;

        try {
            agency = mapper.readValue(params.get("body"), Agency.class);
            agency.save();

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

            agency.save();

            // check if gtfsAgencyId is specified, if not create from DB id
            if(agency.gtfsAgencyId == null) {
                agency.gtfsAgencyId = "AGENCY_" + agency.id.toString();
                agency.save();
            }

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

            // check if gtfsAgencyId is specified, if not create from DB id
            if(agency.gtfsAgencyId == null)
              agency.gtfsAgencyId = "AGENCY_" + agency.id.toString();

            Agency updatedAgency = Agency.em().merge(agency);
            updatedAgency.save();

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

      Agency agency = new Agency(gtfsId, name, url, timezone, language, phone);
     
      agency.defaultLat = defaultLat;
      agency.defaultLon = defaultLon;
     
      agency.save();
     
      Bootstrap.index();
    }
   
    // helper bootstap function for updating from GeoServer-centric db versions
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.