Package er.extensions.eof

Examples of er.extensions.eof.ERXEC.saveChanges()


        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


         
          if (city != null) {
            city.setPopulation(RandomUtils.nextInt(3));
          }
         
          ec.saveChanges();
        } finally {
          ec.unlock();
        }
       
      }
View Full Code Here


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

      ec.saveChanges();

      Integer cnt = ERXEOControlUtilities.objectCountWithQualifier(ec, City.ENTITY_NAME, City.DISTICT.eq("DC"));

      assertNotNull(cnt);
      assertEquals(Integer.valueOf(1), cnt);
View Full Code Here

        country.setFlag(flag);
      } catch (IOException e) {
        log.error(org.apache.commons.lang.exception.ExceptionUtils.getFullStackTrace(e), e);
        throw new RuntimeException(e.getMessage(), e);
      }
      ec.saveChanges();
      cnt = ERXEOControlUtilities.objectCountWithQualifier(ec, Country.ENTITY_NAME, Country.CODE.eq("USA"));

      assertNotNull(cnt);
      assertEquals(Integer.valueOf(1), cnt);
    } finally {
View Full Code Here

    ec.lock();
    try {
      Country country = Country.fetchCountry(ec, Country.CODE.eq("NLD"));
      final String headOfState = "Queen " + country.headOfState();
      country.setHeadOfState(headOfState);
      ec.saveChanges();

      Integer cnt = ERXEOControlUtilities.objectCountWithQualifier(ec, Country.ENTITY_NAME, Country.HEAD_OF_STATE.eq(headOfState));

      assertNotNull(cnt);
      assertEquals(Integer.valueOf(1), cnt);
View Full Code Here

    ERXEC ec = (ERXEC) ERXEC.newEditingContext();
    ec.lock();
    try {
      Country country = Country.fetchCountry(ec, Country.CODE.eq("NOR"));
      country.delete();
      ec.saveChanges();

      Integer cnt = ERXEOControlUtilities.objectCountWithQualifier(ec, Country.ENTITY_NAME, Country.CODE.eq("NOR"));

      assertNotNull(cnt);
      assertEquals(Integer.valueOf(0), cnt);
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.