JAVA/CORBA クラス


例:LimitUpdatedBy プロパティ
次のエージェントは、0 から 1000 までの更新の範囲を 100 ずつ増やして循環します。

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();
double lu = db.getLimitUpdatedBy();
if (lu > 1000)
db.setLimitUpdatedBy(0);
else
db.setLimitUpdatedBy(lu + 100);
System.out.println("LimitUpdatedBy = " + db.getLimitUpdatedBy());

} catch(Exception e) {
e.printStackTrace();
}
}
}

関連項目