Package com.apps.datastore.dao

Examples of com.apps.datastore.dao.SectionInformationObject


  public List<SectionInformationObject> getSectionList() {
    List<Entity> sel = getKindEntityList(SECTION_KIND);
    List<SectionInformationObject> siol = new ArrayList<SectionInformationObject>();
    for (Iterator i = sel.iterator(); i.hasNext();) {
      Entity e = (Entity) i.next();
      SectionInformationObject sio = getSectionFromEntity(e);
      siol.add(sio);
    }
    return siol;
  }
View Full Code Here


    q.addSort(SECTION_ID_PROPERTY, SortDirection.ASCENDING);   
    List<Entity> sel = datastore.prepare(q).asList(FetchOptions.Builder.withDefaults());
    List<SectionInformationObject> siol = new ArrayList<SectionInformationObject>();
    for (Iterator i = sel.iterator(); i.hasNext();) {
      Entity e = (Entity) i.next();
        SectionInformationObject sio = getSectionFromEntity(e);
        siol.add(sio);
    }
    return siol;
  }
View Full Code Here

    String building = (String) e.getProperty(BUILDING_PROPERTY);
    String room = (String) e.getProperty(ROOM_PROPERTY);
    boolean cdf = (Boolean) e.getProperty(CDF_PROPERTY);
    String dropNoW = (String) e.getProperty(DROP_NO_W_PROPERTY);
    String dropW = (String) e.getProperty(DROP_W_PROPERTY);
    return new SectionInformationObject(departmentId, courseId, sectionId,
        activity, term, day, location, start, end, instructor,
        building, room, cdf, dropNoW, dropW);
  }
View Full Code Here

    for(Iterator<Entity> i = el.iterator(); i.hasNext(); ) {
      Entity e = i.next();
      String dept = (String) e.getProperty(WORKLIST_ITEM_DEPT_PROPERTY);
      String course = (String)e.getProperty(WORKLIST_ITEM_COURSE_PROPERTY);
      String section = (String)e.getProperty(WORKLIST_ITEM_SECTION_PROPERTY);
      SectionInformationObject sio = spiderDatastore.querySectionFromId(dept, course, section);
      siol.add(sio);
    }
   
    return siol;
  }
View Full Code Here

          }
          // System.out.println(id + ", " + activity + ", " + term +
          // ", " + day + ", " + location + ", " + start + ", " + end
          // + ", " + instructor + ", " + building + ", " + room +
          // ", " + cdf + ", " + dropNoWDate + ", " + dropWDate);
          SectionInformationObject sio = new SectionInformationObject(
              cio.getDepartmentId(), cio.getCourseId(), id,
              activity, term, day, location, start, end,
              instructor, building, room, cdf, dropNoWDate,
              dropWDate);
          if (id != "" && id != null)
View Full Code Here

      if (i == 0) {
        breaktime = breaktime.concat("Your lecture starts at "
            + day.get(i).getStart() + "\n");
      }
      SectionInformationObject class_1 = day.get(i);
      SectionInformationObject class_2 = day.get(i + 1);
      GoogleDirectionModel model = service
          .getDirections(class_1, class_2);
      total_distance += model.getDistance();
      total_time += model.getTime();
      if (!class_1.getEnd().equals(class_2.getStart())) {
        breaktime = breaktime.concat("Break from: ");
        breaktime = breaktime.concat(class_1.getEnd());
        breaktime = breaktime.concat("-");
        breaktime = breaktime.concat(class_2.getStart());
        breaktime = breaktime.concat("\n");
      }

      if (i == day.size() - 1) {
        breaktime = breaktime.concat("Your lecture ends at "
View Full Code Here

    }

    List<SectionInformationObject> day = new LinkedList<SectionInformationObject>();

    for (int i = 0; i < course.size(); i++) {
      SectionInformationObject section = course.get(i);

      if (section.getTerm().equals(term)) {
        day.add(section);
      }
    }

    return day;
View Full Code Here

    }

    List<SectionInformationObject> day = new LinkedList<SectionInformationObject>();

    for (int i = 0; i < course.size(); i++) {
      SectionInformationObject section = course.get(i);

      String days = section.getDay();
      String[] daysing = days.split(" ");

      for (int j = 0; j < daysing.length; j++) {
        if (today.equals(daysing[j])) {
          day.add(section);
View Full Code Here

    }

    List<SectionInformationObject> day = new LinkedList<SectionInformationObject>();

    for (int i = 0; i < course.size(); i++) {
      SectionInformationObject section = course.get(i);

      String days = section.getDay();
      String[] daysing = days.split(" ");

      for (int j = 0; j < daysing.length; j++) {
        if (today.equals(daysing[j])) {
          day.add(section);
View Full Code Here

  public String[] getStartEnd(List<SectionInformationObject> day) {
    String[] startEnd = new String[2];
    startEnd[0] = "8";
    startEnd[1] = "17";
    if (!day.isEmpty()) {
      SectionInformationObject start = findMin(day);
      if (start != null && start.getStart().contains(":"))
        startEnd[0] = start.getStart().split(":")[0];
      SectionInformationObject end = findMax(day);
      if (end != null && end.getEnd().contains(":"))
        startEnd[1] = end.getEnd().split(":")[0];
    }
    return startEnd;
  }
View Full Code Here

TOP

Related Classes of com.apps.datastore.dao.SectionInformationObject

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.