Package org.objectweb.speedo.pobjects.collection

Examples of org.objectweb.speedo.pobjects.collection.H


    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    G g = new G("g1_testA");
    Collection hs = g.getHs();
    for(int i=0; i<NBOBJ; i++) {
      H h = new H("hid_" + i);
      h.setH1("h1_testA");
      hs.add(h);
    }
    pm.makePersistent(g);
    g = null;
    hs = null;
    pm.currentTransaction().commit();
    pm.evictAll();
    pm.close();
    pm = pmf.getPersistenceManager();
    pm.evictAll();
    pm.currentTransaction().begin();
    H h0 = (H) pm.getObjectById(pm.newObjectIdInstance(H.class, "hid_0"), false);
    assertNotNull("Null h0", h0);
    g = h0.getG();
    assertNotNull("Null g", g);
    pm.deletePersistentAll(g.getHs());
    pm.deletePersistent(g);
    pm.currentTransaction().commit();
    pm.close();
View Full Code Here


    //create persistent instances
    pm.currentTransaction().begin();
    G g = new G("g1_testCollectionElementLoadingWithPrefetch");
    Collection hs = g.getHs();
    for(int i=0; i<NBOBJ; i++) {
      H h = new H("hid_" + i);
      h.setH1("h1_testCollectionElementLoadingWithPrefetch");
      hs.add(h);
    }
    hs = null;
    pm.makePersistent(g);
    Object g_oid = pm.getObjectId(g);
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.pobjects.collection.H

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.