Package org.openntf.domino

Examples of org.openntf.domino.DateTime


     *            the second reference
     */
    private void iterateSecondReferences(final Set<Document> secondReference) {
      System.out.println("ITERATING Second reference set");
      for (Document doc : secondReference) {
        DateTime created = doc.getCreated();
        dateCount++;
        String busyWork3 = created.getDateOnly();
      }
    }
View Full Code Here


     * Iterate third references.
     */
    private void iterateThirdReferences() {
      System.out.println("ITERATING Third reference set");
      for (Document doc : thirdReference) {
        DateTime initMod = doc.getInitiallyModified();
        dateCount++;
        String busyWork4 = initMod.getDateOnly();
      }
    }
View Full Code Here

        }
      }
      System.out.println("ENDING Creation of Documents: " + new Date().toString());
      System.out.println("START Extra-processing of retained docs");
      for (Document d : docset) {
        DateTime dt = d.getCreated();
        d.replaceItemValue("$Created", dt);
        d.save();
      }
      System.out.println("ENDED Extra-processing of retained docs");
    }
View Full Code Here

        }
      }
      System.out.println("ENDING Creation of Documents");
      System.out.println("START Extra-processing of retained docs");
      for (Document d : docset) {
        DateTime dt = d.getCreated();
        d.replaceItemValue("$Created", dt);
        d.save();
      }
      System.out.println("ENDED Extra-processing of retained docs");
    }
View Full Code Here

        }
      }
      System.out.println("ENDING Creation of Documents");
      System.out.println("START Extra-processing of retained docs");
      for (Document d : docset) {
        DateTime dt = d.getCreated();
        d.replaceItemValue("$Created", dt);
        d.save();
      }
      System.out.println("ENDED Extra-processing of retained docs");
    }
View Full Code Here

        }
        if (docCount % 2000 == 0) {
          thirdReference.add(db.getDocumentByUNID(doc.getUniversalID()));
          System.out.println("Created second reference for " + doc.getUniversalID());
        }
        DateTime toxic = doc.getLastModified();
        String busyWork = toxic.getGMTTime();
        DateTime toxic2 = doc.getLastModified();
        String busyWork2 = toxic2.getDateOnly();
        // System.out.println("LastMod: " + toxic.getGMTTime());
        dateCount++;
      }

      System.out.println("ENDING ITERATION of Documents");
      for (Document doc : secondReference) {
        DateTime created = doc.getCreated();
        String busyWork3 = created.getDateOnly();
      }

      System.out.println("ENDING ITERATION of Documents");
      for (Document doc : thirdReference) {
        DateTime initMod = doc.getInitiallyModified();
        String busyWork4 = initMod.getDateOnly();
        System.out.println(busyWork4);
      }

      System.out.println("Thread " + Thread.currentThread().getName() + " processed " + nameCount + " names, " + docCount
          + " docs, and " + dateCount + " datetimes without recycling.");
View Full Code Here

  }

  public void runDateTimes() {
    Session s = Factory.getSession();
    Date d = new Date();
    DateTime dt = s.createDateTime(d);
    DateTime dt2 = s.createDateTime(d);
    StringBuilder sb = new StringBuilder();
    sb.append(Utils.doChecks(dt, dt2));
    sb.append("<br/><br/>");
    dt.adjustHour(1);
    sb.append(Utils.doChecks(dt, dt2));
View Full Code Here

    }
    Document firstDoc = firstEnt.getDocument();
    Document secondDoc = secondEnt.getDocument();
    String firstDt = firstDoc.getFirstItem("Date").getText();
    String secondDt = secondDoc.getFirstItem("Date").getText();
    DateTime firstDate = s.createDateTime(firstDt);
    DateTime secondDate = s.createDateTime(secondDt);
    sb.append("Comparing " + firstDt + " (" + firstDoc.getUniversalID() + ") with " + secondDt + " ("
        + secondDoc.getUniversalID() + ")...");
    if (firstDate.isBefore(secondDate)) {
      sb.append("first before second");
    } else {
      sb.append("first NOT before second");
    }
    sb.append("..........................................................................................");
    sb.append("Comparing " + secondDt + " (" + secondDoc.getUniversalID() + ") with " + firstDt + " ("
        + firstDoc.getUniversalID() + ")...");
    if (secondDate.isBefore(firstDate)) {
      sb.append("second before first");
    } else {
      sb.append("second NOT before first");
    }
    ExtLibUtil.getViewScope().put("javaTest", sb.toString());
View Full Code Here

    }
    Document firstDoc = firstEnt.getDocument();
    Document secondDoc = secondEnt.getDocument();
    String firstDt = firstDoc.getFirstItem("Date").getText();
    String secondDt = secondDoc.getFirstItem("Date").getText();
    DateTime firstDate = s.createDateTime(firstDt);
    DateTime secondDate = s.createDateTime(secondDt);
    sb.append("Comparing " + firstDt + " (" + firstDoc.getUniversalID() + ") with " + secondDt + " ("
        + secondDoc.getUniversalID() + ")...");
    if (firstDate.isAfter(secondDate)) {
      sb.append("first after second");
    } else {
      sb.append("first NOT after second");
    }
    sb.append("..........................................................................................");
    sb.append("Comparing " + secondDt + " (" + secondDoc.getUniversalID() + ") with " + firstDt + " ("
        + firstDoc.getUniversalID() + ")...");
    if (secondDate.isAfter(firstDate)) {
      sb.append("second after first");
    } else {
      sb.append("second NOT after first");
    }
    ExtLibUtil.getViewScope().put("javaTest", sb.toString());
View Full Code Here

    Document firstDoc = threads.getNthDocument(randomInt);
    randomInt = randomGenerator.nextInt(100);
    Document secondDoc = threads.getNthDocument(randomInt);
    String firstDt = firstDoc.getFirstItem("Date").getText();
    String secondDt = secondDoc.getFirstItem("Date").getText();
    DateTime firstDate = s.createDateTime(firstDt);
    DateTime secondDate = s.createDateTime(secondDt);
    sb.append("Comparing " + firstDt + " (" + firstDoc.getUniversalID() + ") with " + secondDt + " ("
        + secondDoc.getUniversalID() + ")...");
    if (firstDate.equals(secondDate)) {
      sb.append("first is the same date/time as second");
    } else {
View Full Code Here

TOP

Related Classes of org.openntf.domino.DateTime

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.