JAVA/CORBA クラス


例:createView メソッド
次のエージェントは新しいビューを作成し、これに別のビューから 2 列をコピーして追加します。

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 viewAll = db.getView("All Documents");
View viewTopics = db.createView("Topics", "SELECT @All");
ViewColumn col1 = viewTopics.copyColumn(viewAll.getColumn(5), 1);
System.out.println("Column " +
col1.getPosition() + " = " + col1.getTitle());
ViewColumn col2 = viewTopics.copyColumn(viewAll.getColumn(1), 2);
System.out.println("Column " +
col2.getPosition() + " = " + col2.getTitle());

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

関連項目