Package org.objectweb.speedo.pobjects.detach.groupama

Examples of org.objectweb.speedo.pobjects.detach.groupama.A


    try{
      Collection as = detachAs();
      Iterator it1 = as.iterator();
      logger.log(BasicLevel.DEBUG, "1st detached:");
      while(it1.hasNext()){
        A a = (A) it1.next();
        logger.log(BasicLevel.DEBUG, a.toString());
      }
    }
    catch (Exception e) {
      logger.log(BasicLevel.DEBUG, e.getMessage());
    }
View Full Code Here


    try{
      Collection as = detachAs();
      Iterator it1 = as.iterator();
      logger.log(BasicLevel.DEBUG, "2nd detached:");
      while(it1.hasNext()){
        A a = (A) it1.next();
        logger.log(BasicLevel.DEBUG, a.toString());
      }
    }
    catch (Exception e) {
      logger.log(BasicLevel.DEBUG, e.getMessage());
    }
View Full Code Here

      }
    }
  }
 
  private void createABC(){
    A a1 = new A(1);
    A a2 = new A(2);
    A a3 = new A(3);
   
    C c1 = new C(1,1,1);
    C c2 = new C(2,2,2);
    C c3 = new C(3,3,3);
    C c4 = new C(4,4,4);
    C c5 = new C(5,5,5);
    C c6 = new C(6,6,6);
   
    B b1 = new B(1, c1);
    B b2 = new B(2, c2);
    B b3 = new B(3, c3);
    B b4 = new B(4, c4);
    B b5 = new B(5, c5);
    B b6 = new B(6, c6);
   
    a1.addB(b1);
    a1.addB(b2);
    a1.addB(b3);
   
    a2.addB(b4);
    a2.addB(b5);
   
    a3.addB(b6);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(a1);
    pm.makePersistent(a2);
View Full Code Here

      Query query = pm.newQuery(A.class);
      Collection results = (Collection)query.execute();
      logger.log(BasicLevel.DEBUG, "A:");
      Iterator it = results.iterator();
      while(it.hasNext()){
        A a = (A) it.next();
        logger.log(BasicLevel.DEBUG, "" + a.toString());
      }
      Collection detachedAs = (Collection) pm.detachCopyAll(results);
      query.closeAll();
      return detachedAs;
    }
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.pobjects.detach.groupama.A

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.