intersect (NotesNoteCollection - JavaScript)

元のコレクションと intersection パラメータで指定された文書に共通の文書を含む文書コレクションを作成します。

定義場所

NotesNoteCollection

構文

intersect(removalspecifier:NotesAgent) : void

intersect(removalspecifier:NotesDocument) : void

intersect(removalspecifier:NotesDocumentCollection) : void

intersect(removalspecifier:NotesForm) : void

intersect(removalspecifier:int) : void

intersect(removalspecifier:NotesNoteCollection) : void

intersect(removalspecifier:string) : void

intersect(removalspecifier:NotesView) : void

パラメータ 説明
removalspecifier 組み合わせる文書。intstring の場合は、文書 ID です。それ以外の場合は、関連するオブジェクトです。

使用法

文書コレクションの親データベース同士は、同じでなければなりません。

このボタンは、現在のデータベース内の文書の文書コレクションを作成します。件名にテキスト「example」が含まれる文書をすべて削除し、修正されたコレクションを DXL としてエクスポートします。
// Open DXL file
var stream:NotesStream = session.createStream();
var filename:string = "c:¥¥dxl¥¥";
filename = filename + database.getFileName();
filename = filename.substring(0, filename.length() - 3) + "dxl";
if (stream.open(filename)) {
	requestScope.status = "Opened " + filename;
	stream.truncate();

	// Create note collection
	var nc:NotesNoteCollection = database.createNoteCollection(false);
	nc.setSelectDocuments(true);
	nc.buildCollection();
	
	// Keep notes that meet search
	var dc:NotesDocumentCollection = database.FTSearch(requestScope.query);
	if (dc.getCount() > 0) {
		nc.intersect(dc); // this crashing - not sure why
	}

	// Export note collection as DXL
	var exporter:NotesDxlExporter = session.createDxlExporter();
	var output:string = exporter.exportDxl(nc);
	stream.writeText(output);
	stream.close();
	requestScope.status = requestScope.status + "¥n" + nc.getCount() +
		" notes written to " + filename;
} else {
	requestScope.status = "Cannot open " + filename;
}

言語間の参照

LotusScript® NotesNoteCollection クラスの Intersect メソッド

Java™ NoteCollection クラスの intersect メソッド