当前位置: 首页>>代码示例>>Java>>正文


Java View.getAllEntries方法代码示例

本文整理汇总了Java中lotus.domino.View.getAllEntries方法的典型用法代码示例。如果您正苦于以下问题:Java View.getAllEntries方法的具体用法?Java View.getAllEntries怎么用?Java View.getAllEntries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lotus.domino.View的用法示例。


在下文中一共展示了View.getAllEntries方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: iterateChildren

import lotus.domino.View; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked") // $NON-NLS-1$
public ITreeNode.NodeIterator iterateChildren(int start, int count) {
    try {
        View view = getView();
        
        ViewEntryCollection col;
        
        Object keys = getKeys();
        if(keys!=null) {
            if(keys instanceof Vector) {
                col = view.getAllEntriesByKey((Vector)keys,isKeysExactMatch());
            } else {
                col = view.getAllEntriesByKey(keys,isKeysExactMatch());
            }
        } else {
            col = view.getAllEntries();
        }
        
        return new ListIterator(view,col,start,count);
    }catch(NotesException ex) {
        throw new FacesExceptionEx(ex,"Error while reading the list or views/folders"); // $NLX-ViewEntryTreeNode.Errorwhilereadingthelistorviewsfo-1$
    }

}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:26,代码来源:ViewEntryTreeNode.java

示例2: createDiscussionDocuments

import lotus.domino.View; //导入方法依赖的package包/类
void createDiscussionDocuments(Database db) throws NotesException, IOException {
	// Construct a list of authors
	// As we want the tag cloud to render differences between the authors, we give
	// as different weight to each author by adding it a random # of times in the list
	// We read the author names from the database
	ArrayList<String> users = new ArrayList<String>();
	View authorView = db.getView("AllContacts");
	authorView.refresh();
	try {
		int maxAuthors = 15;
		int nAuthor = 0;
		ViewEntryCollection authorCol = authorView.getAllEntries();
		for(ViewEntry e=authorCol.getFirstEntry(); e!=null && nAuthor<maxAuthors; e=authorCol.getNextEntry()) {
			Vector<?> values = e.getColumnValues();
			String name = (String)values.get(7);
			// Add it a random number of times to the list
			int n = ((int)(Math.random()*maxAuthors))+1;
			for(int jj=0; jj<n; jj++) {
				users.add(name);
			}
			nAuthor++;
		}
	} finally {
		authorView.recycle();
	}
	if(users.size()==0) {
		// Just in case they were not created...
		users.add("John Doe");
	}

	View w = db.getView("AllThreads");
	w.getAllEntries().removeAll(true);
	createDiscussionDocument(db, null, users, new int[]{0}, disc_rootDocs);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:35,代码来源:DataInitializer.java


注:本文中的lotus.domino.View.getAllEntries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。