Examples of PersistenceStrategy


Examples of com.thoughtworks.xstream.persistence.PersistenceStrategy

          new File(ruta).mkdirs();
            //System.out.println("created:"+ruta);
        }

      //System.out.println("RUTA:"+ruta+"/"+serName);
      PersistenceStrategy strategy = new FilePersistenceStrategy(new File(ruta));
      // creates the list:
      List list = new XmlArrayList(strategy);
      list.add(event);
      return true;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.persistence.PersistenceStrategy

      return false;
    }
   }
  
   public Event getEventByID(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)) {
View Full Code Here

Examples of com.thoughtworks.xstream.persistence.PersistenceStrategy

      OnlyDir onlyDir = new OnlyDir();
      String[] listDirs = file.list(onlyDir);
      Vector vector =new Vector();
      for(int i = 0;i<listDirs.length;i++){
        try{
          PersistenceStrategy strategy = new FilePersistenceStrategy(new File(path+"/"+serName+"/"+listDirs[i]));
          List list = new XmlArrayList(strategy);
       
          for(Iterator it = list.iterator(); it.hasNext(); ) {
           
            Event event = (Event) it.next();
View Full Code Here

Examples of com.thoughtworks.xstream.persistence.PersistenceStrategy

    }
   
   }
     
   public Event[] getAllEvents(String path,String serName){
       PersistenceStrategy strategy = new FilePersistenceStrategy(new File(path+"/"+serName));
    // creates the list:
    List list = new XmlArrayList(strategy);
    if(list.size()>0){
      Event[] array = (Event[])list.toArray(new Event[list.size()]);
      return array;
View Full Code Here

Examples of com.thoughtworks.xstream.persistence.PersistenceStrategy

    else
      return null;
   }
  
   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)) {
View Full Code Here

Examples of com.thoughtworks.xstream.persistence.PersistenceStrategy

    }
    return false;
   }
  
   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)) {
View Full Code Here

Examples of org.apache.openjpa.persistence.PersistenceStrategy

            .getTableName(), ab, fmd);
    }

    @Override
    protected PersistenceStrategy getStrategy(FieldMetaData fmd) {
        PersistenceStrategy strat = super.getStrategy(fmd);
        FieldMapping field = (FieldMapping) fmd;
        switch (strat) {
            case MANY_MANY:
                // we can differentiate a one-many by the fact that there is no
                // secondary table join, or the fk is unique
View Full Code Here

Examples of org.apache.openjpa.persistence.PersistenceStrategy

            .getTableName());
    }

    @Override
    protected PersistenceStrategy getStrategy(FieldMetaData fmd) {
        PersistenceStrategy strat = super.getStrategy(fmd);
        FieldMapping field = (FieldMapping) fmd;
        switch (strat) {
            case MANY_MANY:
                // we can differentiate a one-many by the fact that there is no
                // secondary table join, or the fk is unique
View Full Code Here

Examples of org.apache.openjpa.persistence.PersistenceStrategy

                    break;
                default:
                    warnUnsupportedTag(name);
            }
        } else if (tag instanceof PersistenceStrategy) {
            PersistenceStrategy ps = (PersistenceStrategy) tag;
            if (_openjpaNamespace > 0) {
                if (ps == PERS
                    || ps == PERS_COLL
                    || ps == PERS_MAP)
                    ret = startStrategy(ps, attrs);
View Full Code Here

Examples of org.apache.openjpa.persistence.PersistenceStrategy

                case REFERENCED_FETCH_GROUP:
                    endReferencedFetchGroup();
                    break;
            }
        } else if (tag instanceof PersistenceStrategy) {
            PersistenceStrategy ps = (PersistenceStrategy) tag;
            if (_openjpaNamespace > 0) {
                endExtendedStrategy(ps);
            }
            else {
                endStrategy(ps);
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.