Package org.openntf.domino

Examples of org.openntf.domino.DocumentCollection


  }

  @Override
  public DocumentCollection getModifiedDocuments(java.util.Date since, final ModifiedDocClass noteClass) {
    try {
      DocumentCollection result;
      if (since == null) {
        since = new Date(0);
      }
      lotus.domino.DateTime tempDT = getAncestorSession().createDateTime(since);
      lotus.domino.DateTime dt = toLotus(tempDT);
View Full Code Here


   * @see org.openntf.domino.Database#getModifiedDocuments(lotus.domino.DateTime, int)
   */
  @Override
  public DocumentCollection getModifiedDocuments(final lotus.domino.DateTime since, final int noteClass) {
    try {
      DocumentCollection result;
      lotus.domino.DateTime dt = toLotus(since);
      result = fromLotus(getDelegate().getModifiedDocuments(dt, noteClass), DocumentCollection.SCHEMA, this);
      if (since instanceof Encapsulated) {
        dt.recycle();
      }
View Full Code Here

   * @see org.openntf.domino.Database#search(java.lang.String, lotus.domino.DateTime, int)
   */
  @Override
  public DocumentCollection search(final String formula, final lotus.domino.DateTime startDate, final int maxDocs) {
    try {
      DocumentCollection result;
      lotus.domino.DateTime dt = toLotus(startDate);
      result = fromLotus(getDelegate().search(formula, dt, maxDocs), DocumentCollection.SCHEMA, this);
      if (startDate instanceof Encapsulated) {
        dt.recycle();
      }
View Full Code Here

        // TODO RPr: Discuss if the other strategies make sense here.
        // In my opinion NoteCollection does work UNTIL the next compact task runs.
        // So it makes NO sense to serialize NoteIDs!
      } else if (value instanceof DocumentCollection) {
        // NoteIDs would be faster for this and, particularly, NoteCollection, but it should be replica-friendly
        DocumentCollection docs = (DocumentCollection) value;
        String[] unids = new String[docs.getCount()];
        int index = 0;
        for (org.openntf.domino.Document doc : docs) {
          unids[index++] = doc.getUniversalID();
        }
        Map<String, String> headers = new HashMap<String, String>(1);
View Full Code Here

        }
        if ("@replicaid".equals(skey)) {
          return this.getAncestorDatabase().getReplicaID();
        }
        if ("@responses".equals(skey)) {
          DocumentCollection resp = this.getResponses();
          if (resp == null)
            return 0;
          return resp.getCount();
        }
        if ("@isnewdoc".equals(skey)) {
          return this.isNewNote();
        }
        if ("@inheriteddocumentuniqueid".equals(skey)) {
View Full Code Here

    int[] nids = new int[dataset_.length];
    //    System.out.println("Beginning merge of " + dataset_.length + " DocumentDatas");
    for (int i = 0; i < nids.length; i++) {
      nids[i] = dataset_[i].nid_;
    }
    DocumentCollection result = new DocumentList(nids, database_);
    //    for (DocumentData data : dataset_) {
    //      result.merge(data.nid_);
    //    }
    //    System.out.println("Completed merge for a result size of " + result.getCount());
    long endMemory = Runtime.getRuntime().freeMemory();
View Full Code Here

   *            Date since when documents should have been modified
   * @since org.openntf.domino 1.0.0
   */
  public void processSince(final Database sourceDb, final Date sinceDate) {
    DateTime dt = sourceDb.getAncestorSession().createDateTime(sinceDate);
    DocumentCollection sourceCollection = sourceDb.getModifiedDocuments(dt, ModifiedDocClass.DATA);
    process(sourceCollection);
  }
View Full Code Here

   *            String form name to restrict DocumentCollection to
   * @since org.openntf.domino 1.0.0
   */
  public void processSince(final Database sourceDb, final Date sinceDate, final String formName) {
    DateTime dt = sourceDb.getAncestorSession().createDateTime(sinceDate);
    DocumentCollection sourceCollection = sourceDb.getModifiedDocuments(dt, ModifiedDocClass.DATA);
    sourceCollection.FTSearch("[Form] = \"" + formName + "\"");
    process(sourceCollection);
  }
View Full Code Here

        txn = targetDb.startTransaction();
      }
      DateTime sourceLastMod = source.getLastModified();
      // Object lookupKey = Factory.wrappedEvaluate(session, getSourceKeyFormula(), source);
      Object lookupKey = getSourceKeyFormula().getValue(source);
      DocumentCollection targetColl = targetView.getAllDocumentsByKey(lookupKey, true);
      for (Document target : targetColl) {
        // boolean targetDirty = false;
        for (Map.Entry<Formula, String> entry : getSyncMap().entrySet()) {
          String targetItemName = entry.getValue();
          java.util.Vector<?> sourceValue = entry.getKey().getValue(source);
View Full Code Here

TOP

Related Classes of org.openntf.domino.DocumentCollection

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.