Examples of makePersistent()


Examples of auction.dao.ItemDAO.makePersistent()

            new Item( "Testitem", "Test Description", user,
                      initialPrice, reservePrice,
                      startDate.getTime(), endDate.getTime() );

        // Don't forget to take the return value, this is basically a merge()
        newItem = itemDAO.makePersistent(newItem);

        // End the unit of work
        getUserTransaction().commit();
        em.close();
View Full Code Here

Examples of auction.dao.ejb3.ItemDAOBean.makePersistent()

            new Item( "Testitem", "Test Description", user,
                      initialPrice, reservePrice,
                      startDate.getTime(), endDate.getTime() );

        // Don't forget to take the return value, this is basically a merge()
        newItem = itemDAO.makePersistent(newItem);

        // End the unit of work
        getUserTransaction().commit();
        em.close();
View Full Code Here

Examples of com.caucho.amber.entity.AmberEntityHome.makePersistent()

    if (entityHome == null)
      throw new AmberException(L.l("{0}: entity has no matching home",
                                   entity.getClass().getName()));

    entityHome.makePersistent(entity, this, false);

    return entity;
  }

  /**
 
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistent()

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

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

    return;

  }
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistent()

  public void save() throws IOException {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      // save this
      pm.makePersistent(this);
    } finally {
      try {
        pm.close();
      } catch (Exception e) {
        log.severe(e.toString());
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistent()

      sub.setUserKey(user.getKey());
      sub.setLastProcessDate(new Date());
      sub.setLatestEntryNotifiedDate(new Date());
     
      pm.currentTransaction().begin();
      pm.makePersistent(sub);
      pm.currentTransaction().commit();

      TalkService.sendMessage(user.getId(),"source added ! :)");
      //update cache
      SubscriptionCache.removeUserFromCache(user.getId());
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistent()

      user = new User();
      user.setId(jid);
      user.setDateCrea(new Date());
      user.setNextUpdate(new Date());
      pm.currentTransaction().begin();
      pm.makePersistent(user);
      pm.currentTransaction().commit();
    }
   
   
    pm.close();
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistent()

          blog.setLatestEntry(calLongTime.getTime());
          blog.setNextUpdate(now);
          blog.setLink(link);
          blog.setRss(rss);
          pm.currentTransaction().begin();
          pm.makePersistent(blog);
          pm.currentTransaction().commit();
        }
      } else {
        Logger.getLogger("updateBlog").log(Level.WARNING,
            "blog not found : "  + link);
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistent()

        if (photo.getAdditionDate() == null) {
            photo.setAdditionDate(new Date());
        }
        PersistenceManager pm = PMF.get().getPersistenceManager();
        try {
            return pm.makePersistent(photo);
        } catch (RuntimeException re) {
            throw re;
        } finally {
            pm.close();
        }
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistent()

     */
  public static void putCertificate(String purpose, String key) {
    try {
      PersistenceManager pm = PMF.get().getPersistenceManager();
        Certificate cert = new Certificate(purpose, key);
        pm.makePersistent(cert);
    } catch(Exception x) {
    }
  }

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