Examples of ViewEntryCollection


Examples of lotus.domino.ViewEntryCollection

  }

  public void getAllEntriesByKey() {
    Database db = null;
    View view = null;
    ViewEntryCollection ec = null;
    ViewEntry entry = null;
    ViewEntry nextEntry = null;
    StringBuilder sb = new StringBuilder();
    try {
      db = ExtLibUtil.getCurrentDatabase();
      view = db.getView("allContactsByState");
      view.setAutoUpdate(false);
      Vector<String> key = new Vector<String>();
      key.add("CA");
      ec = view.getAllEntriesByKey(key, true);
      entry = ec.getFirstEntry();
      while (entry != null) {
        nextEntry = ec.getNextEntry();
        try {
          sb.append(entry.getColumnValues().get(7) + "...");
        } catch (lotus.domino.NotesException ne1) {
          ne1.printStackTrace();
        } finally {
          entry.recycle();
        }
        entry = nextEntry;
      }
    } catch (lotus.domino.NotesException ne) {
      ne.printStackTrace();
    } finally {
      try {
        ec.recycle();
      } catch (lotus.domino.NotesException ne) {

      }
    }
    ExtLibUtil.getViewScope().put("oldJavaTest", sb.toString());
View Full Code Here

Examples of lotus.domino.ViewEntryCollection

  }

  public void getAllEntriesByKeyNoMatch() {
    Database db = null;
    View view = null;
    ViewEntryCollection ec = null;
    ViewEntry entry = null;
    ViewEntry nextEntry = null;
    StringBuilder sb = new StringBuilder();
    try {
      db = ExtLibUtil.getCurrentDatabase();
      view = db.getView("allContactsByState");
      view.setAutoUpdate(false);
      Vector<String> key = new Vector<String>();
      key.add("CX");
      ec = view.getAllEntriesByKey(key, true);
      sb.append("Getting values...");
      entry = ec.getFirstEntry();
      while (entry != null) {
        nextEntry = ec.getNextEntry();
        try {
          sb.append(entry.getColumnValues().get(7) + "...");
        } catch (lotus.domino.NotesException ne1) {
          ne1.printStackTrace();
        } finally {
          entry.recycle();
        }
        entry = nextEntry;
      }
      sb.append("Done");
    } catch (lotus.domino.NotesException ne) {
      ne.printStackTrace();
    } finally {
      try {
        ec.recycle();
      } catch (lotus.domino.NotesException ne) {

      }
    }
    ExtLibUtil.getViewScope().put("oldJavaTest", sb.toString());
View Full Code Here

Examples of lotus.domino.ViewEntryCollection

        if (StringUtil.isEmpty(searchType)) {
          searchType = SEARCH_STARTFROM;
        }

        if (StringUtil.equals(searchType, SEARCH_MATCH)) {
          ViewEntryCollection vc = view.getAllEntriesByKey(key);
          ViewEntry ve = start > 0 ? vc.getNthEntry(start) : vc.getFirstEntry();
          for (int i = 0; i < count && ve != null; i++) {
            entries.add(meta.createEntry(ve));
            ve = vc.getNextEntry(ve);
          }
          int nEntries = vc.getCount();
          return new Result(entries, nEntries);
        }
        if (StringUtil.equals(searchType, SEARCH_FTSEARCH)) {
          applyFTSearch(options, view, key);
          ViewEntryCollection vc = view.getAllEntries();
          ViewEntry ve = start > 0 ? vc.getNthEntry(start) : vc.getFirstEntry();
          for (int i = 0; i < count && ve != null; i++) {
            entries.add(meta.createEntry(ve));
            ve = vc.getNextEntry(ve);
          }
          int nEntries = vc.getCount();
          return new Result(entries, nEntries);
        } else {
          ViewNavigator nav = view.createViewNav();
          try {
            ViewEntry ve = null;
View Full Code Here

Examples of lotus.domino.ViewEntryCollection

        if (StringUtil.isEmpty(searchType)) {
          searchType = SEARCH_STARTFROM;
        }

        if (StringUtil.equals(searchType, SEARCH_MATCH)) {
          ViewEntryCollection vc = view.getAllEntriesByKey(key);
          ViewEntry ve = start > 0 ? vc.getNthEntry(start) : vc.getFirstEntry();
          for (int i = 0; i < count && ve != null; i++) {
            entries.add(meta.createEntry(ve));
            ve = vc.getNextEntry(ve);
          }
          int nEntries = vc.getCount();
          return new Result(entries, nEntries);
        }
        if (StringUtil.equals(searchType, SEARCH_FTSEARCH)) {
          applyFTSearch(options, view, key);
          ViewEntryCollection vc = view.getAllEntries();
          ViewEntry ve = start > 0 ? vc.getNthEntry(start) : vc.getFirstEntry();
          for (int i = 0; i < count && ve != null; i++) {
            entries.add(meta.createEntry(ve));
            ve = vc.getNextEntry(ve);
          }
          int nEntries = vc.getCount();
          return new Result(entries, nEntries);
        } else {
          ViewNavigator nav = view.createViewNav();
          try {
            ViewEntry ve = null;
View Full Code Here

Examples of org.openntf.domino.ViewEntryCollection

    ArrayList<String> users = new ArrayList<String>();
    View authorView = db.getView("AllContacts");
    authorView.refresh();
    int maxAuthors = 15;
    int nAuthor = 0;
    ViewEntryCollection ec = authorView.getAllEntries();
    for (ViewEntry e : ec) {
      Vector<?> values = e.getColumnValues();
      String name = (String) values.get(7);
      // Add it a random number of times to the list
      int n = ((int) (Math.random() * maxAuthors)) + 1;
View Full Code Here

Examples of org.openntf.domino.ViewEntryCollection

    StringBuilder sb = new StringBuilder();
    Database db = Factory.getSession().getCurrentDatabase();
    View view = db.getView("allContactsByState");
    ArrayList<String> key = new ArrayList<String>();
    key.add("CA");
    ViewEntryCollection ec = view.getAllEntriesByKey(key, true);
    for (ViewEntry entry : ec) {
      sb.append(entry.getColumnValues().get(7) + "...");
    }
    ExtLibUtil.getViewScope().put("javaTest", sb.toString());
  }
View Full Code Here

Examples of org.openntf.domino.ViewEntryCollection

    StringBuilder sb = new StringBuilder();
    Database db = Factory.getSession().getCurrentDatabase();
    View view = db.getView("allContactsByState");
    ArrayList<String> key = new ArrayList<String>();
    key.add("CX");
    ViewEntryCollection ec = view.getAllEntriesByKey(key, true);
    sb.append("Getting values...");
    for (ViewEntry entry : ec) {
      sb.append(entry.getColumnValues().get(7) + "...");
    }
    sb.append("Done");
View Full Code Here

Examples of org.openntf.domino.ViewEntryCollection

      ViewColumn length = btitles.createColumn(1, "Title", "Title");
      length.setSorted(true);
      timelog("View defined.");
      btitles.refresh();
      timelog("Completed view build.");
      ViewEntryCollection vec = btitles.getAllEntries();
      int count = vec.getCount();
      timelog("Found " + count + " documents in the view");
      btitles.remove();
      timelog("Removed view.");
      btitles.recycle();
      db.recycle();
View Full Code Here

Examples of org.openntf.domino.ViewEntryCollection

      Arrays.asList(nc.getNoteIDs());
      Set setAll = new HashSet(Arrays.asList(nc.getNoteIDs()));

      View allView = db.getView("All Documents");
      ViewEntryCollection vec = allView.getAllEntries();
      ViewEntry entry = vec.getFirstEntry();
      ViewEntry next = null;
      while (entry != null) {
        next = vec.getNextEntry(entry);
        setAll.remove(entry.getNoteIDAsInt());
        // entry.recycle();
        entry = next;
      }
    }
View Full Code Here

Examples of org.openntf.domino.ViewEntryCollection

   *
   * @see org.openntf.domino.iterators.AbstractDominoIterator#getCollection()
   */
  @Override
  public ViewEntryCollection getCollection() {
    ViewEntryCollection result = null;
    Base<?> collection = super.getCollection();
    if (collection instanceof ViewEntryCollection) {
      result = (ViewEntryCollection) collection;
    }
    return result;
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.