Package lotus.domino

Examples of lotus.domino.Item


  }

  public void run2(final Session session) throws NotesException {
    Database db = session.getDatabase("", "log.nsf");
    Document doc = db.createDocument();
    Item names = doc.replaceItemValue("Names", "CN=Nathan T Freeman/O=REDPILL");
    names.setAuthors(true);
    doc.replaceItemValue("form", "test");
    doc.save(true);
    String nid = doc.getNoteID();
    doc.recycle();
    doc = db.getDocumentByID(nid);
    Vector<Double> numbers = new Vector<Double>();
    numbers.add(new Double(1));
    numbers.add(new Double(2));

    doc.replaceItemValue("Names", numbers);
    doc.save(true);
    doc.recycle();
    doc = db.getDocumentByID(nid);
    names = doc.getFirstItem("Names");
    System.out.println("Names is " + names.getType() + " with " + names.isNames() + " and " + names.isAuthors() + " and value "
        + names.getText());
    doc.recycle();
    db.recycle();
  }
View Full Code Here


          entry.setPreferJavaDates(true);
          List<Object> columnValues = entry.getColumnValues();

          List<String> moderators = new Vector<String>();
          Document doc = entry.getDocument();
          Item moderatorsItem = doc.getFirstItem("TModerators");
          if (moderatorsItem != null) moderators = (Vector<String>)moderatorsItem.getValues();
          Type type = new Type((String)columnValues.get(2),
              (String)columnValues.get(3),
              moderators,
              (String)columnValues.get(4),
              (String)columnValues.get(0),
View Full Code Here

   
   
  }

  public static Calendar getDateField(Document doc, String fieldName) throws NotesException {
    Item someItem=doc.getFirstItem(fieldName);
    DateTime someDate=null;
    Calendar result=null;
   
    if(null != someItem && someItem.getType()==Item.DATETIMES) {
      someDate=someItem.getDateTimeValue();
      result=Calendar.getInstance();
      result.setTime(someDate.toJavaDate());
    }

    if(someItem!=null) someItem.recycle();
    if(someDate!=null) someDate.recycle();
   
    return result;
  }
View Full Code Here

TOP

Related Classes of lotus.domino.Item

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.