Package org.objectweb.speedo.pobjects.odis

Examples of org.objectweb.speedo.pobjects.odis.Concurrent


  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();
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.pobjects.odis.Concurrent

Copyright © 2018 www.massapicom. 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.