Package com.thoughtworks.xstream.persistence

Examples of com.thoughtworks.xstream.persistence.XmlArrayList


   }
  
   public boolean delEvent(String id,String path,String serName){
       PersistenceStrategy strategy = new FilePersistenceStrategy(new File(path+"/"+serName));
    // creates the list:
    List list = new XmlArrayList(strategy);
    for(Iterator it = list.iterator(); it.hasNext(); ) {
      Event event = (Event) it.next();
      if(event.getId().equals(id)) {
        it.remove();
        return true;
      }
View Full Code Here


   }
  
   public boolean updEvent(String id,Event newEvent,String path,String serName){
       PersistenceStrategy strategy = new FilePersistenceStrategy(new File(path+"/"+serName));
    // creates the list:
    List list = new XmlArrayList(strategy);
    for(Iterator it = list.iterator(); it.hasNext(); ) {
      Event event = (Event) it.next();
      if(event.getId().equals(id)) {
        it.remove();
        list.add(newEvent);
        return true;
      }
    }
    return false;
   }
View Full Code Here

  //prepares the file strategy to directory /tmp
  StreamStrategy strategy = new FileStreamStrategy(new File(path1+ "WEB-INF" + c));

  // creates the list:
  List list = new XmlArrayList(strategy);
  list.add(event)
      } catch (Exception e)
      {
         e.printStackTrace();
   r=false;
      }
View Full Code Here

TOP

Related Classes of com.thoughtworks.xstream.persistence.XmlArrayList

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.