JAVA/CORBA クラス


例:getPrevDocument メソッド
次のエージェントは、現在のデータベースの [By Category] ビューのすべての文書を逆順で取得します。

import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Database db = agentContext.getCurrentDatabase();
View view = db.getView("By Category");
System.out.println
("***By Category view - all documents in reverse***");
Document doc = view.getLastDocument();
while (doc != null) {
System.out.println
("\t" + doc.getItemValueString("Subject"));
doc = view.getPrevDocument(doc); }
} catch(Exception e) {
e.printStackTrace();
}
}
}

関連項目