Package org.openntf.domino

Examples of org.openntf.domino.ViewNavigator


      if (null != view) {
        view.setAutoUpdate(false);

        System.out.println(view.getEntryCount());

        ViewNavigator nav = view.createViewNav();
        // nav.setCacheSize(400);
        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);
        }
      }

      long elapsed = System.nanoTime() - start;
      System.out.println("-- STOP --");
View Full Code Here


      if (null != view) {
        view.setAutoUpdate(false);

        System.out.println(view.getEntryCount());

        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);
        }
      }

      long elapsed = System.nanoTime() - start;
      System.out.println("-- STOP --");
View Full Code Here

  public void dateTimeIsBeforeTest() {
    StringBuilder sb = new StringBuilder();
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    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();
View Full Code Here

  public void dateTimeIsAfterTest() {
    StringBuilder sb = new StringBuilder();
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    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();
View Full Code Here

      //      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

      }
      View v = iDB.getView(iLookupView);
      if (v == null)
        return;
      v.setAutoUpdate(false);
      ViewNavigator nav = v.createViewNav();
      for (ViewEntry ve = nav.getFirst(); ve != null; ve = nav.getNext())
        oneDBMsgText(ve);
    } catch (Throwable t) {
      t.printStackTrace();
    } finally {
      iDB = null;
View Full Code Here

TOP

Related Classes of org.openntf.domino.ViewNavigator

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.