public void concUpdateSameObject(ExtObjectContainer oc, int seq) throws Exception { Query query = oc.query(); query.descend("_s").constrain(testString + COUNT / 2); ObjectSet result = query.execute(); Assert.areEqual(1, result.size()); SimpleObject o = (SimpleObject) result.next(); o.setI(COUNT + seq); oc.store(o); }
public void concUpdateDifferentObject(ExtObjectContainer oc, int seq) throws Exception { Query query = oc.query(); query .descend("_s") .constrain(testString + seq) .and(query.descend("_i").constrain(new Integer(seq))); ObjectSet result = query.execute(); Assert.areEqual(1, result.size()); SimpleObject o = (SimpleObject) result.next(); o.setI(seq + COUNT); oc.store(o); }
public void concUpdate(ExtObjectContainer oc, int seq) throws Exception { Query q = oc.query(); q.constrain(IndexedByIdentityTestCase.class); ObjectSet os = q.execute(); Assert.areEqual(COUNT, os.size()); while (os.hasNext()) { IndexedByIdentityTestCase idi = (IndexedByIdentityTestCase) os.next(); idi.atom.name = "updated" + seq; oc.store(idi); Thread.sleep(100); } }