當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。