Package org.openntf.domino

Examples of org.openntf.domino.Session$Schema


     * @param secondReference
     *            the second reference
     */
    private void iterateAllDocuments(final Database db, final Set<Document> secondReference) {
      System.out.println("Thread " + Thread.currentThread().getName() + " BEGINNING ITERATION of Documents");
      Session s = db.getParent();
      DocumentCollection dc = db.getAllDocuments();
      for (Document doc : dc) {
        docCount++;
        Vector v = doc.getItemValue("$UpdatedBy");
        for (Object o : v) {
          if (o instanceof String) {
            Name n = s.createName((String) o);
            String cn = n.getCommon();
            nameCount++;
          }
        }
        if (docCount % 1000 == 0) {
View Full Code Here


     */
    @Override
    public void run() {
      long start = System.nanoTime();

      Session s = Factory.getSession();
      RunContext rc = Factory.getRunContext();
      System.out.println("RunContext: " + rc.toString());
      Name sname = s.getUserNameObject();
      DateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
      System.out.println(df.format(new Date()) + " Name: " + sname.getCanonical());
      Database db = s.getDatabase("", "OneMillion.nsf");
      if (INCLUDE_FORMS) {
        iterateForms(db);
      }
      Set<Document> secondReference = new HashSet<Document>();
      iterateAllDocuments(db, secondReference);
View Full Code Here

    private static final String TARGET = "target.nsf";

    @Override
    public void run() {

      Session s = Factory.getSession();
      Database source = s.getDatabase("", TARGET, true);

      System.out.println("-- START --");
      long start = System.nanoTime();
      for (Document doc : source.getAllDocuments()) {
        doc.removePermanently(true);
View Full Code Here

    @Override
    public void run() {
      Document doc = null;
      System.out.println("START Creation of Documents:" + new Date().toString());
      Session s = Factory.getSession();
      Set<Document> docset = new HashSet<Document>();
      Database db = s.getDatabase("", "OneMillion.nsf", true);
      if (!db.isOpen()) {
        Database db2 = s.getDatabase("", "billing.ntf", true);
        db = db2.createCopy("", "OneMillion.nsf");
        if (!db.isOpen())
          db.open();
      }
View Full Code Here

    private static final String VIEW = "Persons";

    @Override
    public void run() {

      Session s = Factory.getSession();
      Database source = s.getDatabase("", TARGET, true);
      View view = source.getView(VIEW);
      System.out.println("-- START --");
      long start = System.nanoTime();

      if (null != view) {
View Full Code Here

    this.session = s;
    this.database = d;
  }

  public static void main(final String[] args) {
    Session s = null;
    Database d = null;
    NotesThread.sinitThread();
    try {
      s = Factory.getSession();
      d = s.getDatabase("heracles/intec-pw", "OpenNTF\\OpenNTFDomino.nsf");
      ViewCheckUniqueTest a = new ViewCheckUniqueTest(s, d);
      a.NotesMain();
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
View Full Code Here

    }
  }

  @SuppressWarnings("unused")
  public void NotesMain() {
    Session session;
    Database database;

    // Fails on checking current database!!

    try {
      Session s;
      Database db;
      if (this.session != null) {
        s = this.session;
        db = this.database;
        try {
View Full Code Here

    @Override
    public void run() {
      Document doc = null;
      System.out.println("START Creation of Documents");
      Session s = Factory.getSession();
      Set<Document> docset = new HashSet<Document>();
      Database db = s.getDatabase("", "OneMillion.nsf", true);
      if (!db.isOpen()) {
        Database db2 = s.getDatabase("", "billing.ntf", true);
        db = db2.createCopy("", "OneMillion.nsf");
        if (!db.isOpen())
          db.open();
      }
View Full Code Here

    private static final String SOURCE = "target.nsf";

    @Override
    public void run() {

      Session s = Factory.getSession();
      Database source = s.getDatabase("", SOURCE, true);

      System.out.println("-- START --");
      long start = System.nanoTime();
      DocumentCollection dc = source.getAllDocuments();
      dc.removeAll(true);
View Full Code Here

  static class DateTimeTest implements Runnable {
    @Override
    public void run() {
      long start = System.nanoTime();
      Session s = Factory.getSession();
      Date d = new Date();
      DateTime dt = (DateTime) s.createDateTime(d);
      DateTime dt2 = (DateTime) s.createDateTime(d);
      doChecks(dt, dt2);
      dt.adjustHour(1);
      doChecks(dt, dt2);
      dt.adjustDay(-1);
      doChecks(dt, dt2);
View Full Code Here

TOP

Related Classes of org.openntf.domino.Session$Schema

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.