Examples of AutoRef


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

    return "TestAutoRef";
  }

 
  public void testA() {
    AutoRef ar1 = new AutoRef("testA_ar1");
    ar1.setMyRef(new AutoRef("testA_ar2"));
    ar1.setMyRefs(Arrays.asList(new AutoRef[]{
        new AutoRef("testA_ar3"), new AutoRef("testA_ar4")}));
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(ar1);
    ar1 = null;
    pm.currentTransaction().commit();
    pm.evictAll();
    pm.currentTransaction().begin();
    ar1 = (AutoRef) pm.getObjectById(
        pm.newObjectIdInstance(AutoRef.class, "testA_ar1"), false);
    pm.deletePersistentAll(ar1.getMyRefs());
    pm.deletePersistent(ar1.getMyRef());
    pm.deletePersistent(ar1);
    pm.currentTransaction().commit();
    pm.close();   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.