Package org.openntf.domino

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


              doc.replaceItemValue("EpisodeTitle", episodeTitle);
              doc.replaceItemValue("EpisodeNumber", episodeNumber);
              doc.replaceItemValue("SeasonNumber", seasonNumber);
              doc.replaceItemValue("ShowNumber", showNumber);
              doc.replaceItemValue("ReleaseYear", releaseYear);
              doc.save();
            } catch (Throwable t) {
              System.out.println("Exception processing line: " + curLine);
              t.printStackTrace();
            }
          }
View Full Code Here


    View contacts = currDb.getView("AllContacts");
    Utils.addAllListeners(currDb);
    Document doc = contacts.getFirstDocument();
    Formula fm = new Formula("@DocumentUniqueID");
    doc.put("javaFormulaField", "Document UNID is " + fm.getValue(doc));
    doc.save(true, false);
    ExtLibUtil.getViewScope().put("javaTest", doc.get("javaFormulaField"));
  }

  public void setDocumentCollectionField() {
    Session s = Factory.getSession();
View Full Code Here

              if (!rawMovieTitle.equalsIgnoreCase(lastTitle)) {
                movieCount++;
                Document doc = db.getDocumentWithKey(rawMovieTitle, false);
                if (doc != null) {
                  doc.replaceItemValue("Genres", genres);
                  doc.save();
                } else {
                  exceptionCount++;
                }
                lastTitle = rawMovieTitle;
                genres = new ArrayList<String>();
View Full Code Here

                  for (String author : plots.keySet()) {
                    plotNumber++;
                    doc.replaceItemValue("plot_" + plotNumber, plots.get(author));
                    doc.replaceItemValue("author_" + plotNumber, author);
                  }
                  doc.save();
                } else {
                  //                  System.out.println("Unable to find movie doc with key: " + expectedTitle);
                  exceptionCount++;
                }
                expectedTitle = null;
View Full Code Here

    View contactsByState = currDb.getView("AllContactsByState");
    Utils.addAllListeners(currDb);
    Document doc = contacts.getFirstDocument();
    DocumentCollection dc = contactsByState.getAllDocumentsByKey("CA", true);
    doc.put("javaDCField", dc);
    doc.save(true, false);
    DocumentCollection srcDc = doc.getItemValue("javaDCField", DocumentCollection.class);
    StringBuilder sb = new StringBuilder();
    for (Document savedDoc : srcDc) {
      sb.append(savedDoc.getNoteID());
      sb.append(", ");
View Full Code Here

                Database db = null; //TODO obviously not...
                @SuppressWarnings("null")
                Document doc = db.getDocumentWithKey(curActor, false);
                if (doc != null) {
                  doc.replaceItemValue("Genres", genres);
                  doc.save();
                } else {
                  exceptionCount++;
                }
                lastActor = curActor;
                genres = new ArrayList<String>();
View Full Code Here

    testMap.put("Per", "Denmark");
    testMap.put("John", "South Africa");
    testMap.put("Mark", "Netherlands");
    testMap.put("Paul", "UK");
    doc.put("javaMapField", testMap);
    doc.save(true, false);
  }

  public void breakNames() {
    try {
      Session s = Factory.getSession();
View Full Code Here

      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

      testItem.setNames(true);
      testItem.setAuthors(true);
      testItem.setReaders(true);
      sb.append("<br/>Checking if Item is Readers, Names or Authors...");
      sb.append(testItem.isReadersNamesAuthors());
      doc.save(true, false);
      sb.append("<br/>Success!!");
      ExtLibUtil.getViewScope().put("javaTest", sb.toString());
    } catch (Throwable t) {

    }
View Full Code Here

        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..."); }
         */
      }
      long elapsed = System.nanoTime() - start;
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.