Package er.extensions.eof

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


  public void testDB2CreateSchema() {
    //    ERXTestUtilities.fixModelsForAdaptorNamed(adaptorName);


    ERXEC ec = (ERXEC) ERXEC.newEditingContext();
    ec.lock();
    try {
      ERXEOAccessUtilities.ChannelAction action = new ERXEOAccessUtilities.ChannelAction() {
        @Override
        protected int doPerform(EOAdaptorChannel channel) {
          try {
View Full Code Here


    @Override
    public void run() {
     
      while (getRun()) {
        ERXEC ec = (ERXEC) ERXEC.newEditingContext();
        ec.lock();
        try {
         
          NSArray<City> cities = City.fetchCities(ec, City.NAME.likeInsensitive(RandomStringUtils.randomAlphabetic(1) + "*"), City.NAME.ascs());
         
        } finally {
View Full Code Here

    @Override
    public void run() {
      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);
         
View Full Code Here

    @Override
    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));
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");
View Full Code Here

  }


  public void testUpdate() {
    ERXEC ec = (ERXEC) ERXEC.newEditingContext();
    ec.lock();
    try {
      Country country = Country.fetchCountry(ec, Country.CODE.eq("NLD"));
      final String headOfState = "Queen " + country.headOfState();
      country.setHeadOfState(headOfState);
      ec.saveChanges();
View Full Code Here

  }

  public void testDelete() {
    ERXEC ec = (ERXEC) ERXEC.newEditingContext();
    ec.lock();
    try {
      Country country = Country.fetchCountry(ec, Country.CODE.eq("NOR"));
      country.delete();
      ec.saveChanges();
View Full Code Here

    resetData();
  }

  public void testFetchAll() {
    ERXEC ec = (ERXEC) ERXEC.newEditingContext();
    ec.lock();
    try {
     
      NSArray<City> cities = City.fetchAllCities(ec);
     
      assertNotNull(cities);
View Full Code Here

    }
  }
 
  public void testSimpleQual() {
    ERXEC ec = (ERXEC) ERXEC.newEditingContext();
    ec.lock();
    try {
     
      NSArray<City> cities = City.fetchCities(ec, City.NAME.like("Rotter*"), null);
     
      assertNotNull(cities);
View Full Code Here

    }
  }

  public void testCaseInsensativeQual() {
    ERXEC ec = (ERXEC) ERXEC.newEditingContext();
    ec.lock();
    try {
     
      NSArray<City> cities = City.fetchCities(ec, City.NAME.likeInsensitive("roTTer*"), null);
     
      assertNotNull(cities);
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.