Package org.openntf.domino

Examples of org.openntf.domino.ViewEntry


        nav.skip(1000000);

        System.out.println("CacheSize: " + nav.getCacheSize());

        view.setAutoUpdate(true);
        ViewEntry entry = null;
        entry = nav.getFirst();
        while (null != entry) {
          entry = nav.getNext(entry);
        }
      }
View Full Code Here


        ViewNavigator nav = view.createViewNav();
        nav.setCacheSize(400);
        System.out.println("CacheSize: " + nav.getCacheSize());

        view.setAutoUpdate(true);
        ViewEntry entry = null;
        entry = nav.getFirst();
        while (null != entry) {
          entry = nav.getNext(entry);
        }
      }
View Full Code Here

      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

    View threadsByDate = currDb.getView("AllThreadsByDate");
    ViewNavigator vNav = threadsByDate.createViewNav();
    vNav.setEntryOptions(org.openntf.domino.ViewNavigator.VN_ENTRYOPT_NOCOLUMNVALUES);
    Random randomGenerator = new Random();
    int randomInt = randomGenerator.nextInt(20);
    ViewEntry firstEnt = vNav.getNth(randomInt);
    while (!firstEnt.isDocument()) {
      firstEnt = vNav.getNext();
    }
    randomInt = randomGenerator.nextInt(20);
    ViewEntry secondEnt = vNav.getNth(randomInt);
    while (!secondEnt.isDocument()) {
      secondEnt = vNav.getNext();
    }
    Document firstDoc = firstEnt.getDocument();
    Document secondDoc = secondEnt.getDocument();
    String firstDt = firstDoc.getFirstItem("Date").getText();
    String secondDt = secondDoc.getFirstItem("Date").getText();
    DateTime firstDate = s.createDateTime(firstDt);
    DateTime secondDate = s.createDateTime(secondDt);
    sb.append("Comparing " + firstDt + " (" + firstDoc.getUniversalID() + ") with " + secondDt + " ("
View Full Code Here

    View threadsByDate = currDb.getView("AllThreadsByDate");
    ViewNavigator vNav = threadsByDate.createViewNav();
    vNav.setEntryOptions(org.openntf.domino.ViewNavigator.VN_ENTRYOPT_NOCOLUMNVALUES);
    Random randomGenerator = new Random();
    int randomInt = randomGenerator.nextInt(20);
    ViewEntry firstEnt = vNav.getNth(randomInt);
    while (!firstEnt.isDocument()) {
      firstEnt = vNav.getNext();
    }
    randomInt = randomGenerator.nextInt(20);
    ViewEntry secondEnt = vNav.getNth(randomInt);
    while (!secondEnt.isDocument()) {
      secondEnt = vNav.getNext();
    }
    Document firstDoc = firstEnt.getDocument();
    Document secondDoc = secondEnt.getDocument();
    String firstDt = firstDoc.getFirstItem("Date").getText();
    String secondDt = secondDoc.getFirstItem("Date").getText();
    DateTime firstDate = s.createDateTime(firstDt);
    DateTime secondDate = s.createDateTime(secondDt);
    sb.append("Comparing " + firstDt + " (" + firstDoc.getUniversalID() + ") with " + secondDt + " ("
View Full Code Here

    return dbView_;
  }

  public List<String> getTermStarts(final String startsWith, final int count) {
    List<String> result = new ArrayList<String>();
    ViewEntry startEntry = getTermView().getEntryByKey(startsWith, false);
    if (startEntry == null) {
      if (log_.isLoggable(Level.FINE))
        log_.log(Level.FINE, "Unable to find ViewEntry for key " + startsWith);
      //      ViewEntryCollection vec = getTermView().getAllEntriesByKey(startsWith, false);
      //      System.out.println("ViewEntryCollection strategy returned " + vec.getCount() + " entries.");
      return result;
    }
    String val = (String) startEntry.getColumnValue(IndexDatabase.TERM_KEY_NAME, String.class);
    result.add(val);
    ViewNavigator nav = getTermView().createViewNavFrom(startEntry, count);
    for (int i = 1; i < count; i++) {
      ViewEntry nextEntry = nav.getNextSibling();
      val = (String) nextEntry.getColumnValue(IndexDatabase.TERM_KEY_NAME, String.class);
      result.add(val);
    }
    return result;
  }
View Full Code Here

   * @see org.openntf.domino.ViewEntryCollection#getNextEntry(lotus.domino.ViewEntry)
   */
  @Override
  public ViewEntry getNextEntry(final lotus.domino.ViewEntry entry) {
    try {
      ViewEntry result = fromLotus(getDelegate().getNextEntry(toLotus(entry)), ViewEntry.SCHEMA, getParent());
      entry.recycle();
      return result;
    } catch (NotesException e) {
      DominoUtils.handleException(e);
      return null;
View Full Code Here

   * @see org.openntf.domino.ViewEntryCollection#getPrevEntry(lotus.domino.ViewEntry)
   */
  @Override
  public ViewEntry getPrevEntry(final lotus.domino.ViewEntry entry) {
    try {
      ViewEntry result = fromLotus(getDelegate().getPrevEntry(toLotus(entry)), ViewEntry.SCHEMA, getParent());
      entry.recycle();
      return result;
    } catch (NotesException e) {
      DominoUtils.handleException(e);
      return null;
View Full Code Here

   * @see java.util.Iterator#next()
   */
  @Override
  public ViewEntry next() {
    //    started_ = true;
    ViewEntry result = null;
    if (hasNext()) {
      previousEntry_ = currentEntry_;  //TODO NTF use if we want to implement a ListIterator
      currentEntry_ = nextEntry_;
      nextEntry_ = null;
      return currentEntry_;
View Full Code Here

   *
   * @see java.util.Iterator#next()
   */
  @Override
  public ViewEntry next() {
    ViewEntry result = null;
    if (hasNext()) {
      previousEntry_ = currentEntry_;  //TODO NTF use if we want to implement a ListIterator
      currentEntry_ = nextEntry_;
      nextEntry_ = null;
      return currentEntry_;
View Full Code Here

TOP

Related Classes of org.openntf.domino.ViewEntry

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.