JAVA/CORBA クラス
例:getAllDocumentsByKey メソッド
1. 次のエージェントは、現在のデータベースの [By Category] ビューのカテゴリ「Spanish leather」のすべての文書を取得し、取得した文書を [Boots] フォルダに入れます。
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");
DocumentCollection dc =
view.getAllDocumentsByKey("Spanish leather", false);
dc.putAllInFolder("Boots");
} catch(Exception e) {
e.printStackTrace();
}
}
}
2. 次のエージェントは、現在のデータベースの [By Category] ビューのカテゴリ「Boots」とサブカテゴリ「Spanish leather」のすべての文書を取得し、取得した文書を [Boot] フォルダに入れます。
import lotus.domino.*;
import java.util.Vector;
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");
Vector v = new Vector();
v.addElement("Boots");
v.addElement("Spanish leather");
Document doc =
view.getDocumentByKey(v, false);
doc.putInFolder("Boots");
} catch(Exception e) {
e.printStackTrace();
}
}
}
関連項目
getAllDocumentsByKey メソッド
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集