Package er.plugintest.model

Examples of er.plugintest.model.City


      for (int i = 0; i < 25; i++) {
        ERXEC ec = (ERXEC) ERXEC.newEditingContext();
        ec.lock();
        try {
          Country country = Country.fetchAllCountries(ec).lastObject();
          City city = City.createCity(ec, RandomStringUtils.randomAlphabetic(15));
          city.setCountryRelationship(country);
         
          ec.saveChanges();
        } finally {
          ec.unlock();
        }
View Full Code Here


    public void run() {
      for (int i = 0; i < 25; i++) {
        ERXEC ec = (ERXEC) ERXEC.newEditingContext();
        ec.lock();
        try {
          City city = City.fetchCity(ec, City.NAME.eq("Amsterdam"));
         
          if (city != null) {
            city.setPopulation(RandomUtils.nextInt(3));
          }
         
          ec.saveChanges();
        } finally {
          ec.unlock();
View Full Code Here

  public void testInsert() {
    ERXEC ec = (ERXEC) ERXEC.newEditingContext();
    ec.lock();
    try {
      City city = City.createCity(ec, "Washington");
      city.setDistict("DC");
      city.setPopulation(650000);
      city.setDescription("This is some text to make sure long strings work");


      log.debug(ERXModelGroup.prototypeEntityNameForModel(model));
      //Employee emp = Employee.createEmployee(ec, "Bugs", "Bunny", false, Company.createCompany(ec, "Boston Opera"));
View Full Code Here

    try {
     
      NSArray<City> cities = City.fetchCities(ec, City.NAME.like("A*"),  City.NAME.ascInsensitives());
     
      assertNotNull(cities);
      City city = cities.objectAtIndex(0);
      assertNotNull(city);
      log.debug(city.name());
      assertEquals("Alkmaar", city.name());
    } finally {
      ec.unlock();
    }
  }
View Full Code Here

TOP

Related Classes of er.plugintest.model.City

Copyright © 2018 www.massapicom. 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.