45464748495051525354
return 0; } }; action.perform(ec, model.name()); } finally { ec.unlock(); } } }
7778798081828384858687
try { NSArray<City> cities = City.fetchCities(ec, City.NAME.likeInsensitive(RandomStringUtils.randomAlphabetic(1) + "*"), City.NAME.ascs()); } finally { ec.unlock(); } } } public synchronized void setRun(boolean run) { this.run = run;
104105106107108109110111112113114
City city = City.createCity(ec, RandomStringUtils.randomAlphabetic(15)); city.setCountryRelationship(country); ec.saveChanges(); } finally { ec.unlock(); } } }
128129130131132133134135136137138
city.setPopulation(RandomUtils.nextInt(3)); } ec.saveChanges(); } finally { ec.unlock(); } } }
5859606162636465666768
cnt = ERXEOControlUtilities.objectCountWithQualifier(ec, Country.ENTITY_NAME, Country.CODE.eq("USA")); assertNotNull(cnt); assertEquals(Integer.valueOf(1), cnt); } finally { ec.unlock(); } } public void testUpdate() {
Integer cnt = ERXEOControlUtilities.objectCountWithQualifier(ec, Country.ENTITY_NAME, Country.HEAD_OF_STATE.eq(headOfState)); assertNotNull(cnt); assertEquals(Integer.valueOf(1), cnt); } finally { ec.unlock(); } } public void testDelete() {
9596979899100101102103104
Integer cnt = ERXEOControlUtilities.objectCountWithQualifier(ec, Country.ENTITY_NAME, Country.CODE.eq("NOR")); assertNotNull(cnt); assertEquals(Integer.valueOf(0), cnt); } finally { ec.unlock(); } } }
3334353637383940414243
NSArray<City> cities = City.fetchAllCities(ec); assertNotNull(cities); assertEquals(28, cities.count()); } finally { ec.unlock(); } } public void testSimpleQual() { ERXEC ec = (ERXEC) ERXEC.newEditingContext();
4748495051525354555657
NSArray<City> cities = City.fetchCities(ec, City.NAME.like("Rotter*"), null); assertNotNull(cities); assertEquals(1, cities.count()); } finally { ec.unlock(); } } public void testCaseInsensativeQual() { ERXEC ec = (ERXEC) ERXEC.newEditingContext();
6162636465666768697071
NSArray<City> cities = City.fetchCities(ec, City.NAME.likeInsensitive("roTTer*"), null); assertNotNull(cities); assertEquals(1, cities.count()); } finally { ec.unlock(); } } public void testJoin() { ERXEC ec = (ERXEC) ERXEC.newEditingContext();