Examples of NoteCollection


Examples of org.openntf.domino.NoteCollection

   * @deprecated RPr: This might be very slow, so I suggest not to use this
   */
  @Override
  @Deprecated
  public NoteCollection getNoteCollection() {
    NoteCollection nc = getAncestorDatabase().createNoteCollection(false);
    nc.setSelectDocuments(true);
    nc.setSelectionFormula(getSelectionFormula());
    nc.buildCollection();
    return nc;
  }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

        }
      }
    } else {
      // According to Tommy Valand's research, the fastest method is to build a NoteCollection with a matching selection formula
      // http://dontpanic82.blogspot.com/2013/06/benchmark-fetching-noteids-and.html
      NoteCollection nc = getNoteCollection();

      int[] nids = nc.getNoteIDs();

      // Arrays.sort(nids);
      // for (org.openntf.domino.Document doc : result) {
      // int nid = Integer.valueOf(doc.getNoteID(), 16);
      // if (!(Arrays.binarySearch(nids, nid) >= 0)) {
View Full Code Here

Examples of org.openntf.domino.NoteCollection

   *
   * @see org.openntf.domino.types.Design#getNoteID()
   */
  @Override
  public String getNoteID() {
    NoteCollection notes = this.getParent().createNoteCollection(false);
    notes.add(this);
    return notes.getFirstNoteID();
  }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

   *
   * @see org.openntf.domino.types.Design#getNoteID()
   */
  @Override
  public String getNoteID() {
    NoteCollection notes = this.getParent().createNoteCollection(false);
    notes.add(this);
    return notes.getFirstNoteID();
  }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

   *
   * @see org.openntf.domino.types.Design#getUniversalID()
   */
  @Override
  public String getUniversalID() {
    NoteCollection notes = this.getParent().createNoteCollection(false);
    notes.add(this);
    return notes.getUNID(notes.getFirstNoteID());
  }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

   */
  @Override
  public int getModifiedNoteCount(final Date since) {
    if (since.after(getAncestorDatabase().getLastModified().toJavaDate()))
      return 0;
    NoteCollection nc = getAncestorDatabase().createNoteCollection(false);
    nc.setSinceTime(since);
    Set<SelectOption> noteClass = new java.util.HashSet<SelectOption>();
    noteClass.add(SelectOption.DOCUMENTS);
    nc.setSelectOptions(noteClass);
    String selectionFormula = getSelectionFormula();
    nc.setSelectionFormula(selectionFormula);
    nc.buildCollection();
    return nc.getCount();
  }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

   */
  @Override
  public int getModifiedNoteCount(final java.util.Date since, final Set<SelectOption> noteClass) {
    if (since.after(this.getLastModified().toJavaDate()))
      return 0;
    NoteCollection nc = createNoteCollection(false);
    nc.setSinceTime(since);
    nc.setSelectOptions(noteClass);
    nc.buildCollection();
    return nc.getCount();
  }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

        Documents.saveState(unids, this, itemName, true, headers);

      } else if (value instanceof NoteCollection) {
        // Maybe it'd be faster to use .getNoteIDs - I'm not sure how the performance compares
        // NTF .getNoteIDs() *IS* faster. By about an order of magnitude.
        NoteCollection notes = (NoteCollection) value;
        String[] unids = new String[notes.getCount()];
        String noteid = notes.getFirstNoteID();
        int index = 0;
        while (noteid != null && !noteid.isEmpty()) {
          unids[index++] = notes.getUNID(noteid);
          noteid = notes.getNextNoteID(noteid);
        }
        Map<String, String> headers = new HashMap<String, String>(1);
        headers.put("X-Original-Java-Class", "org.openntf.domino.NoteCollection");
        Documents.saveState(unids, this, itemName, true, headers);

View Full Code Here

Examples of org.openntf.domino.NoteCollection

  /* (non-Javadoc)
   * @see org.openntf.domino.types.Design#getNoteID()
   */
  @Override
  public String getNoteID() {
    NoteCollection notes = this.getParentDatabase().createNoteCollection(false);
    notes.setSelectOutlines(true);
    notes.setSelectionFormula("$TITLE=\"" + this.getName().replace("\"", "\\\"") + "\"");
    notes.buildCollection();
    return notes.getFirstNoteID();
  }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

  /* (non-Javadoc)
   * @see org.openntf.domino.types.Design#getUniversalID()
   */
  @Override
  public String getUniversalID() {
    NoteCollection notes = this.getParentDatabase().createNoteCollection(false);
    notes.setSelectOutlines(true);
    notes.setSelectionFormula("$TITLE=\"" + this.getName().replace("\"", "\\\"") + "\"");
    notes.buildCollection();
    return notes.getUNID(notes.getFirstNoteID());
  }
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.