Package net.solosky.maplefetion.store

Examples of net.solosky.maplefetion.store.FetionStore.deleteBuddy()


        String suserId = e.getAttributeValue("user-id")//使用user-id更合理
        if(suserId!=null){
          int    iuserId = Integer.parseInt(suserId);
          Buddy buddy    = store.getBuddyByUserId(iuserId);
          if(buddy!=null){
            store.deleteBuddy(buddy);
            logger.info("Deleted buddy: "+buddy);
          }
        }
      }
     
View Full Code Here


    switch(statusCode) {
    case 200:
      int userId = Integer.parseInt(element.getAttributeValue("user-id"));
      Buddy buddy = store.getBuddyByUserId(userId);
      if(buddy!=null){
        store.deleteBuddy(buddy);
      }
      buddy = new Buddy();
      BeanHelper.toBean(Buddy.class, buddy, element);
     
      store.addBuddy(buddy);
View Full Code Here

    Element element = XMLHelper.find(root, "/results/contacts/buddies/buddy");
    FetionStore store = this.context.getFetionStore();
    if(element!=null && element.getAttributeValue("user-id")!=null) {
      Buddy buddy = store.getBuddyByUserId(Integer.parseInt(element.getAttributeValue("user-id")));
      if(buddy!=null)
        store.deleteBuddy(buddy);
    }
   
    Element contacts = XMLHelper.find(root, "/results/contacts");
    if(contacts!=null && contacts.getAttributeValue("version")!=null){
      int version = Integer.parseInt(contacts.getAttributeValue("version"));
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.