Examples of asList()


Examples of com.google.appengine.api.datastore.PreparedQuery.asList()

    q.addFilter(DEPARTMENT_ID_PROPERTY, FilterOperator.EQUAL, deptId);
    q.addFilter(COURSE_ID_PROPERTY, FilterOperator.GREATER_THAN_OR_EQUAL, prefix);
    q.addSort(DEPARTMENT_ID_PROPERTY, SortDirection.ASCENDING);
    q.addSort(COURSE_ID_PROPERTY, SortDirection.ASCENDING);
    PreparedQuery pq = datastore.prepare(q)
    List<Entity> results = pq.asList(FetchOptions.Builder.withLimit(10));
    List<CourseInformationObject> ciol = new ArrayList<CourseInformationObject>();
    for(Iterator<Entity> i = results.iterator(); i.hasNext();) {
      Entity e = i.next();
      String courseId = (String)e.getProperty(COURSE_ID_PROPERTY);
      if(courseId.startsWith(prefix))
View Full Code Here

Examples of com.google.appengine.api.datastore.PreparedQuery.asList()

    q.addFilter(SECTION_ID_PROPERTY, FilterOperator.GREATER_THAN_OR_EQUAL, prefix);
    q.addSort(DEPARTMENT_ID_PROPERTY, SortDirection.ASCENDING);
    q.addSort(COURSE_ID_PROPERTY, SortDirection.ASCENDING);
    q.addSort(SECTION_ID_PROPERTY, SortDirection.ASCENDING);
    PreparedQuery pq = datastore.prepare(q);
    List<Entity> results = pq.asList(FetchOptions.Builder.withLimit(10));
    List<SectionInformationObject> siol = new ArrayList<SectionInformationObject>();
    for(Iterator<Entity> i = results.iterator(); i.hasNext();){
      Entity e = i.next();
      String sectionId = (String)e.getProperty(SECTION_ID_PROPERTY);
      if(sectionId.startsWith(prefix))
View Full Code Here

Examples of com.google.appengine.api.datastore.PreparedQuery.asList()

      q_sub.addSort(SUBSCRIPTION_STATUS_PROPERTY, SortDirection.DESCENDING);
    }
    else if (type.equalsIgnoreCase(SUBSCRIPTION_STATUS_ACTIVE))
      q_sub.addFilter(SUBSCRIPTION_STATUS_PROPERTY, FilterOperator.EQUAL, SUBSCRIPTION_STATUS_ACTIVE);
    PreparedQuery pq = datastore.prepare(q_sub);
    List<Entity> entityList = pq.asList(FetchOptions.Builder.withDefaults());
    for(Iterator<Entity> i = entityList.iterator(); i.hasNext();){
      Entity e = i.next();
      String email = (String) e.getProperty(SUBSCRIPTION_EMAIL_PROPERTY);
      String status = (String) e.getProperty(SUBSCRIPTION_STATUS_PROPERTY);
      subl.add(new SubscriptionInformationObject(email,status));
View Full Code Here

Examples of com.google.appengine.api.datastore.PreparedQuery.asList()

      return false;
    Key key = e_from.getKey();
    Query q_sub = new Query(SUBSCRIPTION_KIND);
    q_sub.setAncestor(key);
    PreparedQuery pq = datastore.prepare(q_sub);
    List<Entity> entityList = pq.asList(FetchOptions.Builder.withDefaults());
    for(Iterator<Entity> i = entityList.iterator(); i.hasNext();){
      Entity e = i.next();
      String to_email = (String) e.getProperty(SUBSCRIPTION_EMAIL_PROPERTY);
      addFeed(to_email,email,message);
    }
View Full Code Here

Examples of com.google.appengine.api.datastore.PreparedQuery.asList()

    q_feed.setAncestor(k);
    q_feed.addSort(FEED_TIMESTAMP_PROPERTY,SortDirection.DESCENDING);
    if(getUnreadOnly)
      q_feed.addFilter(FEED_READ_STATUS_PROPERTY, FilterOperator.EQUAL, false);
    PreparedQuery pq_feed = datastore.prepare(q_feed);
    List<Entity> entityList = pq_feed.asList(FetchOptions.Builder.withDefaults());
    for(Iterator<Entity> i = entityList.iterator(); i.hasNext();) {
      Entity e_feed = i.next();
      Text feed_message_t = (Text)e_feed.getProperty(FEED_MESSAGE_PROPERTY);
      String feed_message = feed_message_t.getValue();
      boolean feed_read = (Boolean)e_feed.getProperty(FEED_READ_STATUS_PROPERTY);
View Full Code Here

Examples of com.google.appengine.api.datastore.PreparedQuery.asList()

      return siol;
    Key k = e_user.getKey();
    Query q = new Query(WORKLIST_ITEM_KIND);
    q.setAncestor(k);
    PreparedQuery pq_wl = datastore.prepare(q);
    List<Entity> el = pq_wl.asList(FetchOptions.Builder.withDefaults());
    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);
View Full Code Here

Examples of com.google.appengine.api.datastore.PreparedQuery.asList()

      return wiol;
    Key k = e_user.getKey();
    Query q = new Query(WORKLIST_ITEM_KIND);
    q.setAncestor(k);
    PreparedQuery pq_wl = datastore.prepare(q);
    List<Entity> el = pq_wl.asList(FetchOptions.Builder.withDefaults());
    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);
View Full Code Here

Examples of com.google.wave.api.Annotations.asList()

    }

    Blip blip = event.getBlip();

    Annotations annotations = event.getBlip().getAnnotations();
    for (Annotation annotation : annotations.asList()) {
      String name = annotation.getName();
      String value = annotation.getValue();
      if (name.equals("stocky") && value.equals("_new_")) {
        int startIndex = annotation.getRange().getStart();
View Full Code Here

Examples of com.itstherules.stream.model.DirectoriesModel.asList()

public class AlbumController extends BaseController {
    @Override
    public void list(Map<String, Object> parameters, HttpServletResponse response) throws IOException {
      DirectoriesModel model = new DirectoriesModel("music/"+parameters.get("directory"));
      parameters.put("directories", model.asList());
      merge("album/list.freemarker", parameters, response.getWriter());
    }
   
    @Override
    public void show(Map<String, Object> parameters, HttpServletResponse response) throws IOException {
View Full Code Here

Examples of com.itstherules.stream.model.ItemsModel.asList()

    return itemPath(directory, item);
  }

  private File itemPath(String subDirectory, String item) {
    ItemsModel items = new ItemsModel(MOVIES, subDirectory, Extension.flv.toString());
    for (File file : items.asList()) {
      if (item.equals(file.getName())) {
        return file;
      }
    }
    throw new RuntimeException();
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.