Examples of save()


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

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

Examples of models.transit.Stop.save()

            stop = mapper.readValue(params.get("body"), Stop.class);

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

            stop.save();

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

Examples of models.transit.StopTime.save()

                }
                else {
                    StopTime updatedStopTime = StopTime.em().merge(stopTime.toStopTime());
                    // this was getting lost somehow
                    updatedStopTime.trip = updatedTrip;
                    updatedStopTime.save();
                }
            }
           
            updatedTrip.save();
View Full Code Here

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

Examples of models.transit.TripPattern.save()

              longestPattern = p;
          }
        }
       
        longestPattern.longest = true;
        longestPattern.save();
      }
    }
  }

  public void simplifyTripShapes() {
View Full Code Here

Examples of models.zoo.Zoo.save()

    @Ignore("wait for full fix")
    @Test
    public void testOrphanRemovalDepDeletion() {
  final Zoo zoo = new Zoo().save();
  zoo.lion = new Animal();
  zoo.save();
  zoo.lion = null; // lion escaped from zoo
  zoo.save(); // this line causes a violation exception: seems to be due
        // to a Hibernate bug (see
        // http://stackoverflow.com/questions/20280271/hibernate-jpa-onetoone-orphan-removal-still-not-working-as-of-4-2-7-4-3-0-cr1)
  assertEquals("There should be no animal left", 0, Animal.count());
View Full Code Here

Examples of name.abuchen.portfolio.util.IniFileManipulator.save()

        {
            IniFileManipulator m = new IniFileManipulator();
            m.load();
            m.unsetClearPersistedState();
            if (m.isDirty())
                m.save();
        }
        catch (IOException ignore)
        {
            PortfolioPlugin.log(ignore);
        }
View Full Code Here

Examples of net.alteiar.newversion.server.document.DocumentLocal.save()

    }
  }

  public void saveGlobalBean(BasicBean bean) throws Exception {
    DocumentLocal doc = new DocumentLocal(bean);
    doc.save(getGlobalPath());
  }

  public String getSpecificBeanPath() {
    return dirSpecific + "/" + specificPath + "/beans";
  }
View Full Code Here

Examples of net.augeas.Augeas.save()

        initAugeas();
        String rootPath = getResourceConfigurationRootPath();
        try {
            Augeas augeas = getAugeas();
            augeas.remove(rootPath);
            augeas.save();
        } finally {
            close();
        }
    }
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.