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


Java Document.getUniversalID方法代码示例

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


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

示例1: writeEntry

import lotus.domino.Document; //导入方法依赖的package包/类
protected void writeEntry(JsonWriter jwriter, Document document 
        ) throws IOException, ServiceException, NotesException {

    String unid = document.getUniversalID();
    if (!StringUtil.isNotEmpty(unid)) {
        return;
    }
    jwriter.startArrayItem();
    jwriter.startObject();
    try {
        DateTime lastModified = document.getLastModified();
        if (lastModified != null)
            writeDominoProperty(jwriter, RestServiceConstants.ATTR_MODIFIED, lastModified);
        writeProperty(jwriter, RestServiceConstants.ATTR_UNID, unid);
        String link = _uri + unid;
        writeProperty(jwriter, RestServiceConstants.ATTR_HREF, link);
    } finally {
        jwriter.endArrayItem();     
        jwriter.endObject();
    }       
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:22,代码来源:JsonDocumentCollectionContent.java

示例2: getEventCode

import lotus.domino.Document; //导入方法依赖的package包/类
/**
 * This example uses DocumentUniqueId as the event code.
 * 
 * @return the event code we will use for Participant docs
 */
private String getEventCode() {

	if(StringUtil.isEmpty(eventCode)) {

		Document eventDoc=getDoc();

		try {
			eventCode = eventDoc.getUniversalID();
		} catch (NotesException e) {
			// Use OpenNTF Domino API to get rid of this.
			e.printStackTrace();
		}

	}

	return eventCode;
}
 
开发者ID:sbasegmez,项目名称:Blogged,代码行数:23,代码来源:ParticipantList.java

示例3: faultyMethod

import lotus.domino.Document; //导入方法依赖的package包/类
@SuppressWarnings("null")
public void faultyMethod() {

	Document doc = null;
	
	try {
		
		@SuppressWarnings("unused")
		String id = doc.getUniversalID();		//will throw a NullPointerException
		
	} catch (Exception e) {
		
		//if you're only using the toolbar in a class to log errors,
		//you might want to call ik like this, so no object is created
		//if no error occur
		DebugToolbar.get().error(e, "DemoClass.faultyMethod");

	}
	
}
 
开发者ID:sbasegmez,项目名称:ic14demos,代码行数:21,代码来源:DemoClass.java

示例4: profileGet

import lotus.domino.Document; //导入方法依赖的package包/类
/**
 * Gets an up-to-date copy of the profile document.
 * 
 * @param database
 * @return
 * @throws NotesException
 */
private Document profileGet(Database database) throws NotesException {
    
    // Open the calendar profile.  This returns a cached copy (may not be up to date).
    
    Document profile = database.getProfileDocument("CalendarProfile", null); // $NON-NLS-1$
    String unid = profile.getUniversalID();
    profile.recycle();
    
    // Open the same document by UNID.  This ensures we get the latest copy.
    
    profile = database.getDocumentByUNID(unid);
    
    return profile;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:22,代码来源:DelegateProvider.java


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