Package org.openntf.domino

Examples of org.openntf.domino.Session


     */
    @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

    // whatever you might want to do in your constructor, but stay away from Domino objects
  }

  @Override
  public void run() {
    Session session = this.getSession();
    Database db = session.getDatabase("", "log.nsf");
    int i = 0;
    try {
      for (i = 0; i < 5; i++) {
        Document doc = db.createDocument();
        System.out
View Full Code Here

TOP

Related Classes of org.openntf.domino.Session

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.