Package org.objectweb.speedo.pobjects.detach

Examples of org.objectweb.speedo.pobjects.detach.Coach


    Player p1 = new Player("p3", t, 20);
    players.add(p1);
    Player p2 = new Player("p4", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c2", 10, t);
    t.setCoach(c);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the team " + t.toString());
View Full Code Here


    Player p1 = new Player("p21", t, 20);
    players.add(p1);
    Player p2 = new Player("p22", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c23", 10, t);
    t.setCoach(c);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the team " + t.toString());
    pm.makePersistent(t);
    pm.currentTransaction().commit();
    try {
      //detach the team t
      Team copyOfT = (Team) pm.detachCopy(t);
      Coach newCoach = new Coach("c33", 15, new Team("DummyTeam",null,null));
      //  update the reference while detached
      copyOfT.setCoach(newCoach);
      //print the team out
      logger.log(BasicLevel.DEBUG, "Copy of team " + copyOfT.toString());
      pm.currentTransaction().begin();
View Full Code Here

    Player p1 = new Player("p5", t, 20);
    players.add(p1);
    Player p2 = new Player("p6", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c3", 10, t);
    t.setCoach(c);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the team " + t.toString());
View Full Code Here

    Player p1 = new Player("p7", t, 20);
    players.add(p1);
    Player p2 = new Player("p8", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c4", 10, t);
    t.setCoach(c);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "attach the team " + t.toString());
View Full Code Here

    Player p1 = new Player("p9", t, 20);
    players.add(p1);
    Player p2 = new Player("p10", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c5", 10, t);
    t.setCoach(c);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the team " + t.toString());
View Full Code Here

    Player p1 = new Player("p11", t, 20);
    players.add(p1);
    Player p2 = new Player("p12", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c6", 10, t);
    t.setCoach(c);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "Make the team persistent " + t.toString());
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.pobjects.detach.Coach

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.