Package org.openntf.domino

Examples of org.openntf.domino.Document.save()


      //      FileOutputStream fos = new FileOutputStream(file);
      //      fos.write(bytes);
      //      fos.close();

      storeTest.writeBinary("imdbNoteList", bytes, 2500 * 24);
      storeTest.save();
      String storeId = storeTest.getUniversalID();
      storeTest.recycle();
      storeTest = null;

      //      coll.recycle();
View Full Code Here


    Database keyDB = getDatabaseForKey(hashKey);

    Document keyDoc = keyDB.getDocumentWithKey(key, true);

    keyDoc.replaceItemValue("Value", value);
    keyDoc.save();
  }

  private Database getDatabaseForKey(final String hashKey) {
    String hashChunk = hashKey.substring(0, places_);
    String dbName = baseName_ + "-" + hashChunk + ".nsf";
View Full Code Here

      for (int i = 1; i < 200000; i++) {

        doc = db.createDocument();
        doc.replaceItemValue("form", "doc");
        doc.replaceItemValue("Subject", String.valueOf(System.nanoTime()));
        doc.save();
        if (i % 5000 == 0) {
          // System.gc();
          docset.add(doc);
          System.out.println("Created " + i + " documents so far. Still going...");
        }
View Full Code Here

      for (int i = 1; i < 1000000; i++) {

        doc = db.createDocument();
        doc.replaceItemValue("form", "doc");
        doc.replaceItemValue("Subject", String.valueOf(System.nanoTime()));
        doc.save();
        if (i % 5000 == 0) {
          // System.gc();
          docset.add(doc);
          System.out.println("Created " + i + " documents so far. Still going...");
        }
View Full Code Here

      for (i = 0; i < 5; i++) {
        Document doc = db.createDocument();
        System.out
            .println("doc " + i + " " + doc.getUniversalID() + ": " + doc.getNoteID() + " " + String.valueOf(doc.isNewNote()));
        //        doc.replaceItemValue("form", "junk");
        doc.save();
        System.out
            .println("doc " + i + " " + doc.getUniversalID() + ": " + doc.getNoteID() + " " + String.valueOf(doc.isNewNote()));
      }
    } catch (Throwable t) {
      t.printStackTrace();
View Full Code Here

      for (int i = 1; i < 1000000; i++) {

        doc = db.createDocument();
        doc.replaceItemValue("form", "doc");
        doc.replaceItemValue("Subject", String.valueOf(System.nanoTime()));
        doc.save();

        if (i % 5000 == 0) {
          // System.gc();
          docset.add(doc);
          System.out.println("Created " + i + " documents so far. Still going...");
View Full Code Here

    Utils.addAllListeners(currDb);
    View threads = currDb.getView("AllContacts");
    Document doc = threads.getFirstDocument();
    DateTime dt = s.createDateTime(new Date());
    doc.put("testDate", dt);
    doc.save(true, false);
    ExtLibUtil.getViewScope().put("javaTest", doc.get("testDate").toString());
  }
}
View Full Code Here

    Map<String, String> map = new HashMap<String, String>();
    map.put("me", "us");
    map.put("myself", "ourselves");
    map.put("I", "we");
    doc.replaceItemValue("map", map);
    doc.save();
    String unid = doc.getUniversalID();
    doc = null;
    Document docJunk = db.createDocument();
    doc = db.getDocumentByUNID(unid);
    System.out.println(doc.getNoteID());
View Full Code Here

  public void saveTokenLocationMap(final CharSequence token, final Object mapKey, final Map<CharSequence, Set<CharSequence>> map) {

    String term = token.toString();
    Document termDoc = getTermDocument(term);
    termDoc.replaceItemValue(TERM_MAP_PREFIX + String.valueOf(mapKey), map);
    termDoc.save();
  }

  @Override
  public void setLastIndexDate(final Object mapKey, final Date date) {
    Document dbDoc = getDbDocument((String) mapKey);
View Full Code Here

  @Override
  public void setLastIndexDate(final Object mapKey, final Date date) {
    Document dbDoc = getDbDocument((String) mapKey);
    dbDoc.replaceItemValue(DB_LAST_INDEX_NAME, date);
    dbDoc.save();
  }

  @Override
  public Date getLastIndexDate(final Object mapKey) {
    Document dbDoc = getDbDocument((String) mapKey);
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.