public void testA() {
PersistenceManager pm = pmf.getPersistenceManager();
int nbobj = 10;
Concurrent[] cs = new Concurrent[nbobj];
for(int i=0; i<nbobj ; i++) {
cs[i] = new Concurrent(i + 10, "d" + i,
new Time(Calendar.getInstance().getTimeInMillis()));
}
pm.makePersistentAll(cs);
pm.close();
pm = pmf.getPersistenceManager();
Query q = pm.newQuery(Concurrent.class);
q.setFilter("(dossard==p1)");
q.declareParameters("String p1");
Collection col = (Collection) q.execute("d3");
Iterator it = col.iterator();
while(it.hasNext()) {
Concurrent c = (Concurrent) it.next();
System.out.println("concurrent : cid=" + c.getCid()
+ ", dossard=" + c.getDossard()
+ ", temps=" + c.getTemps());
}
q.closeAll();
pm.close();
pm = pmf.getPersistenceManager();