createDocumentCollection (NotesDatabase - JavaScript)

データベース内に文書コレクションを作成して、その新しいコレクションを表す NotesDocumentCollection オブジェクトを返します。

定義場所

NotesDatabase

構文

createDocumentCollection() : NotesDocumentCollection
戻り値 説明
NotesDocumentCollection 新規の文書コレクション。

使用法

新規文書を保存する場合は、save を呼び出す必要があります。

以下のボタンは、文書コレクションを作成し、文書を条件に応じて追加した後、これらの文書を削除します。
var dc:NotesDocumentCollection = database.createDocumentCollection();
var view:NotesView = database.getView("main");
var doc:NotesDocument = view.getFirstDocument();
while (doc != null) {
	if (doc.getItemValueString("subject").endsWithIgnoreCase("obsolete")) {
		dc.addDocument(doc);
	}
	var tmpdoc = view.getNextDocument(doc);
	doc.recycle();
	doc = tmpdoc;
}
requestScope.status = "Number of documents removed: " + dc.getCount();
dc.removeAll(true);

言語間の参照

LotusScript® NotesDatabase クラスの CreateDocumentCollection メソッド

Java™ Database クラスの createDocumentCollection メソッド