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


Java Document.getUniversalID方法代码示例

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


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

示例1: getView

import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public View getView(final Document viewDocument) {
	View result = null;
	if (viewDocument.hasItem("$Index") || viewDocument.hasItem("$Collection") || viewDocument.hasItem("$Collation")
			|| viewDocument.hasItem("$VIEWFORMAT")) {
		String unid = viewDocument.getUniversalID();
		String rawtitles = viewDocument.getItemValue("$Title", String.class);
		String[] titles = PIPE_SPLIT.split(rawtitles);
		for (String title : titles) {
			View chk = getView(title);
			if (chk.getUniversalID().equalsIgnoreCase(unid)) {
				result = chk;
				break;
			}
		}
	}
	return result;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:19,代码来源:Database.java

示例2: LocalNoteList

import org.openntf.domino.Document; //导入方法依赖的package包/类
public LocalNoteList(final DocumentCollection dc, final Date buildDate) {
	buildDate_ = buildDate;
	replid_ = org.openntf.domino.big.NoteCoordinate.Utils.getLongFromReplid(dc.getAncestorDatabase().getReplicaID());
	delegate_ = new ArrayList<LocalNoteCoordinate>(dc.getCount());
	for (Document doc : dc) {
		String unid = doc.getUniversalID();
		delegate_.add(new LocalNoteCoordinate(unid, this));
	}
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:10,代码来源:LocalNoteList.java

示例3: setErrDoc

import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public void setErrDoc(final Document doc) {
	if (doc != null) {
		_errDoc = doc;
		try {
			_errDocUnid = doc.getUniversalID();
		} catch (Exception ee) {// Added PW
			debugPrint(ee);// Added PW
		}
	}
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:12,代码来源:BaseOpenLogItem.java

示例4: setDocument

import org.openntf.domino.Document; //导入方法依赖的package包/类
protected final void setDocument(final Document document) {
	database_ = document.getAncestorDatabase();
	universalId_ = document.getUniversalID(); // we must save the UNID. because NoteID may change on various instances
	document_ = document;
	lastModified_ = document.getLastModifiedDate();
	dxl_ = null;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:8,代码来源:AbstractDesignBase.java

示例5: NoteCoordinate

import org.openntf.domino.Document; //导入方法依赖的package包/类
public NoteCoordinate(final Document doc) {
	this(doc.getAncestorDatabase().getReplicaID(), doc.getUniversalID());
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:4,代码来源:NoteCoordinate.java

示例6: DocumentData

import org.openntf.domino.Document; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
public DocumentData(final Document document, final List<String> criteria) {
	nid_ = Integer.valueOf(document.getNoteID(), 16);
	//			replid_ = document.getAncestorDatabase().getReplicaID();
	//			unid_ = document.getUniversalID();
	String rid = document.getAncestorDatabase().getReplicaID();
	System.arraycopy(rid.getBytes(), 0, address_, 0, 16);
	String unid = document.getUniversalID();
	System.arraycopy(unid.getBytes(), 0, address_, 16, 32);
	//			values_ = new ArrayList<Serializable>();
	values_ = new Serializable[criteria.size()];
	if (criteria != null && !criteria.isEmpty()) {
		for (int i = 0; i < criteria.size(); i++) {
			Object obj = document.get(criteria.get(i));
			if (obj == null) {
				values_[i] = Null.INSTANCE;
			} else if (obj instanceof Vector) {
				if (!((Vector) obj).isEmpty()) {
					Object first = ((Vector) obj).get(0);
					if (first instanceof Serializable) {
						if (first instanceof Date) {
							values_[i] = ((Date) first).getTime();
						} else {
							values_[i] = (Serializable) first;
						}
					} else {
						values_[i] = Null.INSTANCE;
					}
				} else {
					values_[i] = Null.INSTANCE;
				}
			} else if (obj instanceof Serializable) {
				if (obj instanceof Date) {
					values_[i] = ((Date) obj).getTime();
				} else {
					values_[i] = (Serializable) obj;
				}
			} else {
				values_[i] = Null.INSTANCE;
			}
		}
	}
	//			valSize_ = values_.length;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:45,代码来源:DocumentSorter.java

示例7: DocumentWriteAccessException

import org.openntf.domino.Document; //导入方法依赖的package包/类
public DocumentWriteAccessException(final Document doc) {
	super("User " + doc.getAncestorSession().getEffectiveUserName() + " not authorized to write to document " + doc.getUniversalID()
			+ " in database " + doc.getAncestorDatabase().getApiPath());
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:5,代码来源:DocumentWriteAccessException.java

示例8: getDocument

import org.openntf.domino.Document; //导入方法依赖的package包/类
Document getDocument(final Object id, final boolean createOnFail) {
	Document result = null;
	String unid = toUnid(id);
	Map<String, Document> map = documentCache.get();

	if (id == null && createOnFail) {
		result = getRawDatabase().createDocument();
		//			synchronized (map) {
		map.put(result.getUniversalID(), result);
		//			}
	}
	unid = toUnid(id);
	if (unid != null && !DominoUtils.isUnid(unid)) {
		log_.log(Level.SEVERE, "ALERT! INVALID UNID FROM id type " + (id == null ? "null" : id.getClass().getName()) + ": " + id);
	}
	if (result == null) {

		result = map.get(unid);
		if (result == null) {
			result = getRawDatabase().getDocumentWithKey(unid, createOnFail);
			if (result != null) {
				String localUnid = result.getUniversalID();
				if (!StringUtil.equalsIgnoreCase(unid, localUnid)) {
					log_.log(Level.SEVERE, "UNIDs do not match! Expected: " + unid + ", Result: " + localUnid);
				}
				//					synchronized (map) {
				map.put(unid, result);
				//					}
			}
		}
	}
	// if (result == null && createOnFail) {
	// log_.log(Level.SEVERE, "Returning a null document for id " + String.valueOf(id)
	// + " even though createOnFail was true. This should be guaranteed to return a real document!");
	// }
	if (result == null && createOnFail) {
		String message = "We are about to return a null result even though createOnFail was true. We should ALWAYS return a Document in that case. For key: "
				+ String.valueOf(id) + " in database " + String.valueOf(filepath_);
		log_.log(Level.SEVERE, message);
		System.out.println(message);
		new RuntimeException().printStackTrace();
	}
	return result;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:45,代码来源:DominoGraph.java


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