Package talkfeed.data

Examples of talkfeed.data.Subscription


  public boolean removeUserSubscription(long id) {

    DataManager dm = DataManagerFactory.getInstance();
    PersistenceManager pm = dm.newPersistenceManager();

    Subscription s = pm.getObjectById(Subscription.class, new Long(id));
    pm.currentTransaction().begin();
    pm.deletePersistent(s);
    pm.currentTransaction().commit();
    pm.flush();
View Full Code Here


      TalkService.sendMessage(user.getId(),"blog not found ! :(");
      return;
    }
   
    //check subscription
    Subscription sub = dataManager.getSubscription(pm , user, blog);
   
    //create new subscription
    if (sub == null){
      sub = new Subscription();
      sub.setBlogKey(blog.getKey());
      sub.setPriority(0);
      sub.setUserKey(user.getKey());
      sub.setLastProcessDate(new Date());
      sub.setLatestEntryNotifiedDate(new Date());
     
      pm.currentTransaction().begin();
      pm.makePersistent(sub);
      pm.currentTransaction().commit();
View Full Code Here

TOP

Related Classes of talkfeed.data.Subscription

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.