Package lotus.domino

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


  }

  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

        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

        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

TOP

Related Classes of lotus.domino.ViewEntryCollection

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.