Package org.openntf.domino

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


    try {
      Session s = Factory.getSession();
      Database currDb = s.getCurrentDatabase();
      View contacts = currDb.getView("AllContacts");
      Document doc = contacts.getFirstDocument();
      Item testItem = doc.replaceItemValue("muppetField", 1);
      testItem.setNames(true);
      doc.save(true, false);
    } catch (Throwable t) {
      ExtLibUtil.getViewScope().put("javaTest", t.getClass().getName() + ": " + t.getLocalizedMessage());
    }
View Full Code Here


      StringBuilder sb = new StringBuilder();
      Session s = Factory.getSession();
      Database currDb = s.getCurrentDatabase();
      View contacts = currDb.getView("AllContacts");
      Document doc = contacts.getFirstDocument();
      Item testItem = doc.replaceItemValue("readersAuthorsNamesField", s.getEffectiveUserName());
      sb.append("Checking if Item is Readers, Names or Authors...");
      sb.append(testItem.isReadersNamesAuthors());
      testItem.setNames(true);
      testItem.setAuthors(true);
      testItem.setReaders(true);
View Full Code Here

      System.out.println("-- START --");
      long start = System.nanoTime();
      for (int i = 1; i < NUMBER_OF_DOCS + 1; i++) {

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

      long start = System.nanoTime();
      for (int i = 1; i < NUMBER_OF_DOCS + 1; i++) {

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

  public void run1() {
    long testStartTime = System.nanoTime();
    Session session = this.getSession();
    Database log = session.getDatabase("", "log.nsf");
    Document storeTest = log.createDocument();
    storeTest.replaceItemValue("form", "BinaryTest");
    Database db = session.getDatabase("", "imdb/movies.nsf");

    try {
      NoteList notelist = new NoteList();
      marktime = System.nanoTime();
View Full Code Here

      if (!(currentDB.getFilePath().equalsIgnoreCase(destDB.getFilePath()) && currentDB.getServer().equalsIgnoreCase(
          destDB.getServer()))) {

        Document destDoc = destDB.createDocument();
        doc_.copyAllItems(destDoc, true);
        destDoc.replaceItemValue("$Created", doc_.getCreated());
        destDoc.setUniversalID(doc_.getUniversalID());
        doc_ = destDoc;
      }

      return doc_.save();
View Full Code Here

    String hashKey = checksum(key, "MD5");
    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_);
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);
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);
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.