Examples of em()


Examples of models.gtfs.GtfsSnapshotMerge.em()

        routeTask.startTask();
       
          for (org.onebusaway.gtfs.model.Route gtfsRoute : store.getAllRoutes()) {
         
            BigInteger agencyId = agencyIdMap.get(gtfsRoute.getAgency().getId());
            BigInteger routeId = Route.nativeInsert(snapshotMerge.em(), gtfsRoute, agencyId);
             
              routeIdMap.put(gtfsRoute.getId().toString(), routeId );
                        
            routeCount++;
          }
View Full Code Here

Examples of models.gtfs.GtfsSnapshotMerge.em()

        GtfsSnapshotMergeTask stopTask = new GtfsSnapshotMergeTask(snapshotMerge);
        stopTask.startTask();
       
          for (org.onebusaway.gtfs.model.Stop gtfsStop : store.getAllStops()) {      
            
            BigInteger stopId = Stop.nativeInsert(snapshotMerge.em(), gtfsStop, primaryAgencyId);
              stopIdMap.put(gtfsStop.getId().toString(), stopId );
                        
            stopCount++;
          }
         
View Full Code Here

Examples of models.gtfs.GtfsSnapshotMerge.em()

             
            }
           
            String linestring = "LINESTRING(" + StringUtils.join(points, ", ") + ")";
             
            BigInteger tripShapeId = TripShape.nativeInsert(snapshotMerge.em(), gtfsShapeId, linestring, describedDistance);
           
              tripShapeIdMap.put(gtfsShapeId, tripShapeId);
             
              shapeCount++;
         
View Full Code Here

Examples of models.gtfs.GtfsSnapshotMerge.em()

         
          Logger.info("GtfsImporter: importing Service Calendars...");
       
          for (org.onebusaway.gtfs.model.ServiceCalendar gtfsService : store.getAllCalendars()) {
           
            BigInteger serviceId = ServiceCalendar.nativeInsert(snapshotMerge.em(), gtfsService, primaryAgencyId);
                     
            serviceIdMap.put(gtfsService.getServiceId().toString(), serviceId);
           
            serviceCalendarCount++;
           
View Full Code Here

Examples of models.gtfs.GtfsSnapshotMerge.em()

          GtfsSnapshotMergeTask serviceCalendarDatesTask = new GtfsSnapshotMergeTask(snapshotMerge);
          serviceCalendarDatesTask.startTask();
       
          for (org.onebusaway.gtfs.model.ServiceCalendarDate gtfsServiceDate : store.getAllCalendarDates()) {
           
            BigInteger serviceDateId = ServiceCalendarDate.nativeInsert(snapshotMerge.em(), gtfsServiceDate);
           
            serviceDateIdMap.put(gtfsServiceDate.getServiceId().toString(), serviceDateId);
           
            serviceCalendarDateCount++;
           
View Full Code Here

Examples of models.gtfs.GtfsSnapshotMerge.em()

              shapeId = tripShapeIdMap.get(gtfsTrip.getShapeId().toString());
     
            BigInteger serviceId = serviceIdMap.containsKey(gtfsTrip.getServiceId().toString()) ? serviceIdMap.get(gtfsTrip.getServiceId().toString()) : null;
            BigInteger serviceDateId = serviceDateIdMap.containsKey(gtfsTrip.getServiceId().toString()) ? serviceDateIdMap.get(gtfsTrip.getServiceId().toString()) : null;
           
            BigInteger tripId = Trip.nativeInsert(snapshotMerge.em(), gtfsTrip, routeId, shapeId, serviceId, serviceDateId);
                     
            tripIdMap.put(gtfsTrip.getId().toString(), tripId);
           
            tripCount++;
         
View Full Code Here

Examples of models.gtfs.GtfsSnapshotMerge.em()

          for (org.onebusaway.gtfs.model.StopTime gtfsStopTime : store.getAllStopTimes()) {
           
            BigInteger stopId = stopIdMap.get(gtfsStopTime.getStop().getId().toString());
            BigInteger tripId = tripIdMap.get(gtfsStopTime.getTrip().getId().toString());
           
            BigInteger stopTimeId = StopTime.nativeInsert(snapshotMerge.em(), gtfsStopTime, tripId, stopId);
           
            StopSequence stopSequence = new StopSequence(stopId, gtfsStopTime.getStopSequence());
           
            if(!tripStopTimeMap.containsKey(tripId))
              tripStopTimeMap.put(tripId, new ArrayList<StopSequence>());
View Full Code Here

Examples of models.gtfs.GtfsSnapshotMerge.em()

         
          String mergeDescription = new String("Imported GTFS file: " + agencyCount + " agencies; " + routeCount + " routes;" + stopCount + " stops; " +  stopTimeCount + " stopTimes; " + tripCount + " trips;" + shapePointCount + " shapePoints");
         
          snapshotMerge.complete(mergeDescription);
         
          inferTripPatterns(snapshotMerge.em());
        
          encodeTripShapes();
         
          snapshotMerge.em().getTransaction().commit();
         
View Full Code Here

Examples of models.gtfs.GtfsSnapshotMerge.em()

         
          inferTripPatterns(snapshotMerge.em());
        
          encodeTripShapes();
         
          snapshotMerge.em().getTransaction().commit();
         
         
         
      }
        catch (Exception e) {
View Full Code Here

Examples of play.db.jpa.JPAContext.em()

        try {
            // do we have a present JPAContext for this db-config in current thread?
            JPAConfig jpaConfig = JPA.getJPAConfig(dbConfigName, true);
            if (jpaConfig!=null) {
                JPAContext jpaContext = jpaConfig.getJPAContext();
                return ((SessionImpl)((org.hibernate.ejb.EntityManagerImpl) jpaContext.em()).getSession()).connection();
            }

            // do we have a current raw connection bound to thread?
            if (localConnection.get() != null) {
                return localConnection.get();
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.