Package org.openntf.domino

Examples of org.openntf.domino.Session


     *
     * @see java.lang.Runnable#run()
     */
    @Override
    public void run() {
      Session s = Factory.getSession();

      Database db = s.getDatabase("", TARGET, true);

      if (!db.isOpen()) {
        Database db2 = s.getDatabase("", TEMPLATE, true);
        db = db2.createCopy("", TARGET);
        if (!db.isOpen())
          db.open();
      }

View Full Code Here


    @Override
    public void run() {

      long start = System.nanoTime();
      Session s = Factory.getSession();
      Database source = s.getDatabase("", SOURCE, true);
      Database target = s.getDatabase("", TARGET, true);

      System.out.println("-- START --");

      for (Document doc : source.getAllDocuments()) {
        doc.copyToDatabase(target);
View Full Code Here

  @Override
  public void run() {
    long testStartTime = System.nanoTime();
    try {
      Session session = this.getSession();
      Database db = session.getDatabase("", "events4.nsf");
      DocumentCollection coll = db.getAllDocuments();
      for (Document doc : coll) {
        System.out.println("nid: " + doc.getNoteID());
      }
      long endTime = System.nanoTime();
View Full Code Here

  public NewDocumentBean() {

  }

  public void doGetPut() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    Utils.addAllListeners(currDb);
    View threads = currDb.getView("AllContacts");
    Document doc = threads.getFirstDocument();
    if (!doc.hasItem("documentToggle")) {
      doc.put("documentToggle", true);
View Full Code Here

  }

  protected Session getSession() {
    try {
      Session session = Factory.fromLotus(NotesFactory.createSession(), Session.class, null);
      return session;
    } catch (Throwable t) {
      DominoUtils.handleException(t);
      return null;
    }
View Full Code Here

    ExtLibUtil.getViewScope().put("javaTest", doc.get("documentToggle"));
  }

  public void containsCheckItems() {
    StringBuilder sb = new StringBuilder();
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    ArrayList<String> items = new ArrayList<String>();
    items.add("FirstName");
    items.add("LastName");
    items.add("City");
View Full Code Here

    }
    ExtLibUtil.getViewScope().put("javaTest", sb.toString());
  }

  public void getCreated() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    Document doc = contacts.getFirstDocument();
    SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy hh:mm");
    String formatted = format.format(doc.getCreatedDate());
    ExtLibUtil.getViewScope().put("javaTest", formatted);
View Full Code Here

    String formatted = format.format(doc.getCreatedDate());
    ExtLibUtil.getViewScope().put("javaTest", formatted);
  }

  public void getCreatedOld() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    Document doc = contacts.getFirstDocument();
    DateTime created = doc.getCreated();
    SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy hh:mm");
    String formatted = format.format(created.toJavaDate());
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

    String formatted = format.format(created.toJavaDate());
    ExtLibUtil.getViewScope().put("javaTest", formatted);
  }

  public void getOtherDates() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    Document doc = contacts.getFirstDocument();
    StringBuilder sb = new StringBuilder();
    SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy hh:mm");
    sb.append("Created: " + format.format(doc.getCreatedDate()));
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.