Package org.objectweb.speedo.pobjects.detach

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


    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();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
    //begin
    pm.currentTransaction().begin();
    //detach the team t
    Team copyOfT = null;
    try {
      copyOfT = (Team) pm.detachCopy(t);
      //  modify the coach
      t.setCoach(new Coach("c31", 10, t));
      Iterator it  = t.getPlayers().iterator();
      //modify the players
      while(it.hasNext()){
        Player p = (Player) it.next();
        p.setAge(99);
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();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
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();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
    //begin
    pm.currentTransaction().begin();
    //modify the coach
    t.setCoach(new Coach("c51", 10, t));
    Iterator it  = t.getPlayers().iterator();
    //modify the players
    while(it.hasNext()){
      Player p = (Player) it.next();
      p.setAge(99);
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();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
View Full Code Here

    Player p1 = new Player("p13", t, 20);
    players.add(p1);
    Player p2 = new Player("p14", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c7", 10, t);
    t.setCoach(c);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
View Full Code Here

    Player p1 = new Player("p15", t, 20);
    players.add(p1);
    Player p2 = new Player("p16", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c8", 10, t);
    t.setCoach(c);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
View Full Code Here

    Player p1 = new Player("p17", t, 20);
    players.add(p1);
    Player p2 = new Player("p18", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c9", 10, t);
    t.setCoach(c);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
View Full Code Here

    Player p1 = new Player("p19", t, 20);
    players.add(p1);
    Player p2 = new Player("p20", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c10", 10, t);
    t.setCoach(c);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
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("c11", 10, t);
    t.setCoach(c);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
View Full Code Here

    Player p1 = new Player("p1", t, 25);
    players.add(p1);
    Player p2 = new Player("p2", t, 32);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c1", 5, 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

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.