EntriesProcessed (NotesCalendar - Java)

Read-only. Number of entries processed by getEntries and readRange operations.

Defined in

NotesCalendar

Syntax

int NotesCalendar.getEntriesProcessed())
	throws NotesException

Usage

Use this property as the third parameter to getEntries and readRange to process entries in successive operations.

Examples

This agent uses getEntries to get calendar and scheduling information for the current user for today and tomorrow.
import lotus.domino.*;

public class JavaAgent extends AgentBase {

    public void NotesMain() {

      try {
          Session session = getSession();
          AgentContext agentContext = session.getAgentContext();

          // (Your code goes here)
          DbDirectory dbdir = session.getDbDirectory("");
          Database maildb = dbdir.openMailDatabase();
          NotesCalendar cal = session.getCalendar(maildb);
          DateTime dt1 = session.createDateTime("Today 08");
          DateTime dt2 = session.createDateTime("Tomorrow 17");
          // Create document to post results
          Database db = agentContext.getCurrentDatabase();
          Document doc = db.createDocument();
          doc.appendItemValue("Form", "main");
          doc.appendItemValue("subject", "Today and tomorrow");
          RichTextItem body = doc.createRichTextItem("body");
          // Get entries and put in body of document
          java.util.Vector entries = cal.getEntries(dt1, dt2, 0, 1);
          while (entries.size() > 0) {
        	   NotesCalendarEntry cale = (NotesCalendarEntry)entries.elementAt(0);
        	   body.appendText(cale.read());
        	   cale.recycle();
        	   body.addNewLine(1);
        	   entries = cal.getEntries(dt1, dt2, cal.getEntriesProcessed(), 1);
          }
          doc.save(true, true);
          
      } catch(Exception e) {
    	  e.printStackTrace();
      }
    }
}
This agent uses readRange to get calendar and scheduling information for the current user for today and tomorrow.
import lotus.domino.*;

public class JavaAgent extends AgentBase {

    public void NotesMain() {

      try {
          Session session = getSession();
          AgentContext agentContext = session.getAgentContext();

          // (Your code goes here)
          DbDirectory dbdir = session.getDbDirectory("");
          Database maildb = dbdir.openMailDatabase();
          NotesCalendar cal = session.getCalendar(maildb);
          DateTime dt1 = session.createDateTime("Today 08");
          DateTime dt2 = session.createDateTime("Tomorrow 17");
          // Create document to post results
          Database db = agentContext.getCurrentDatabase();
          Document doc = db.createDocument();
          doc.appendItemValue("Form", "main");
          doc.appendItemValue("subject", "Today and tomorrow");
          RichTextItem body = doc.createRichTextItem("body");
          // Get entries and put in body of document
          String entrystring = cal.readRange(dt1, dt2, 0, 1);
          while (entrystring.length() > 0) {
        	   body.appendText(entrystring);
        	   body.addNewLine(1);
        	   entrystring = cal.readRange(dt1, dt2, cal.getEntriesProcessed(), 1);
          }
          doc.save(true, true);
          
      } catch(Exception e) {
    	  e.printStackTrace();
      }
    }
}