Package javax.jdo

Examples of javax.jdo.PersistenceManager.makePersistent()


            }

            project.setState( build.getState() );

            //TODO: Use projectDao
            pm.makePersistent( project );

            tx.commit();
        }
        finally
        {
View Full Code Here


     */
    protected Object makePersistent(Object pc) {
        addTearDownClass(pc.getClass());
        PersistenceManager pm = getPM();
        pm.currentTransaction().begin();
        pm.makePersistent(pc);
        Object result = JDOHelper.getObjectId(pc);
        pm.currentTransaction().commit();
        return result;
    }
   
View Full Code Here

            pm.makePersistent (rect1);
           
            PCPoint p21 = new PCPoint(210, 220);
            PCPoint p22 = new PCPoint(220, 240);
            PCRect rect2 = new PCRect (0, p21, p22);
            pm2.makePersistent (rect2);
           
            tx.commit();
            tx2.commit();
       
            tx.begin();
View Full Code Here

   *        consumer secret.
   */
  private void storeUserProfile(OAuthUser user) {
    PersistenceManager pm = pmf.getPersistenceManager();
    try {
      pm.makePersistent(user);
    } finally {
      pm.close();
    }
  }

View Full Code Here

      stored_contract = null;
    }

    if (stored_contract == null) {
      con.setLastprocessed(now);
      pm.makePersistent(con);
    } else {
      updateStoredContract(stored_contract, con);
    }
    pm.close();
View Full Code Here

    Event ev = new Event(event_id, event_gid, event_name, event_displayorder, event_description, start, end);
    ev.setLastretrieved(oldest_updatetime);
    print("Storing:" + ev.toString());

    PersistenceManager pm = PMF.get().getPersistenceManager();
    pm.makePersistent(ev);
    pm.close();

    return oldest_updatetime;

  }
View Full Code Here

    EventGroup eg = new EventGroup(group_id, group_name, group_displayorder, parentClassId);
    eg.setLastretrieved(now);
    print("Storing:" + eg.toString());

    PersistenceManager pm = PMF.get().getPersistenceManager();
    pm.makePersistent(eg);
    pm.close();

    return;

  }
View Full Code Here

      stored_contract = null;
    }

    if (stored_contract == null) {
      con.setLastprocessed(now);
      pm.makePersistent(con);
    } else {
      updateStoredContract(stored_contract, con);
    }
    pm.close();
View Full Code Here

    EventClass ec = new EventClass(event_id, event_name, event_displayorder);
    ec.setLastretrieved(oldest_updatetime);
    print("Storing:" + ec.toString());

    PersistenceManager pm = PMF.get().getPersistenceManager();
    pm.makePersistent(ec);

    pm.close();

    return oldest_updatetime;
View Full Code Here

    EventGroup eg = new EventGroup(group_id, group_name, group_displayorder, parentClassId);
    eg.setLastretrieved(oldest_updatetime);
    print("Storing:" + eg.toString());

    PersistenceManager pm = PMF.get().getPersistenceManager();
    pm.makePersistent(eg);
    pm.close();

    return oldest_updatetime;

  }
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.