本文整理汇总了Java中lotus.domino.Document.removeItem方法的典型用法代码示例。如果您正苦于以下问题:Java Document.removeItem方法的具体用法?Java Document.removeItem怎么用?Java Document.removeItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lotus.domino.Document
的用法示例。
在下文中一共展示了Document.removeItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processConflict
import lotus.domino.Document; //导入方法依赖的package包/类
/**
* Process conflict.
*
* @param doc the doc
* @throws NotesException the notes exception
*/
//latest one in wins.
protected void processConflict(Document doc) throws NotesException{
Document parent = doc.getParentDatabase().getDocumentByUNID(doc.getParentDocumentUNID());
Document winner = null;
if(parent.getCreated().toJavaDate().before(doc.getCreated().toJavaDate())){
winner = doc;
this.flagForDeletion(parent);
}else{
winner = parent;
this.flagForDeletion(doc);
}
winner.removeItem(StringCache.FIELD_CONFLICT);
winner.removeItem(StringCache.FIELD_REF);
winner.save();
}
示例2: flagForDeletion
import lotus.domino.Document; //导入方法依赖的package包/类
/**
* Flag for deletion.
*
* @param doc the doc
* @throws NotesException the notes exception
*/
private void flagForDeletion(Document doc) throws NotesException{
doc.removeItem(StringCache.FIELD_REF);
doc.removeItem(StringCache.FIELD_CONFLICT);
doc.replaceItemValue(StringCache.FIELD_FORM, Const.FIELD_VALUE_DELETE);
doc.save();
}
示例3: writeAddresses
import lotus.domino.Document; //导入方法依赖的package包/类
private static void writeAddresses(Document document, String itemName, AddressList addresses) throws NotesException {
document.removeItem(itemName);
if ( addresses != null && addresses.size() > 0 ) {
Vector<String> values = new Vector<String>();
for ( int i = 0; i < addresses.size(); i++ ) {
Address address = addresses.get(i);
values.add(address.toString());
}
document.replaceItemValue(itemName, values);
}
}