本文整理汇总了Java中org.openntf.domino.Document.isNewNote方法的典型用法代码示例。如果您正苦于以下问题:Java Document.isNewNote方法的具体用法?Java Document.isNewNote怎么用?Java Document.isNewNote使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openntf.domino.Document
的用法示例。
在下文中一共展示了Document.isNewNote方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isView
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public boolean isView() {
if (isView_ == null) {
Document doc = getDocument();
if (!doc.isNewNote()) {
try {
isView_ = DesignFactory.isView(doc);
} catch (Exception e) {
isView_ = false;
// System.err.println("Exception thrown while checking isView for a document: " + e.getMessage() + " on notecoordinate "
// + toString());
}
} else {
isView_ = false;
}
}
return isView_;
}
示例2: isIcon
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public boolean isIcon() {
if (isIcon_ == null) {
if (x == 0l && y == 0l) {
isIcon_ = true;
} else {
Document doc = getDocument();
if (!doc.isNewNote()) {
// System.out.println("TEMP DEBUG Icon checking noteid " + String.valueOf(doc.getNoteID()));
// String fields = Strings.join(doc.keySet(), ",");
// System.out.println("TEMP DEBUG fields: " + fields);
isIcon_ = DesignFactory.isIcon(doc);
}
}
}
return isIcon_;
}
示例3: getDbDocument
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Document getDbDocument(final CharSequence dbid) {
String key = dbid.toString().toUpperCase();
Document result = getIndexDb().getDocumentWithKey(key, true);
if (result.isNewNote()) {
result.replaceItemValue("Form", DB_FORM_NAME);
result.replaceItemValue(DB_KEY_NAME, dbid);
result.save();
}
return result;
}
示例4: getTermDocument
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Document getTermDocument(final CharSequence token) {
String key = caseSensitive_ ? token.toString() : token.toString().toLowerCase();
Document result = getIndexDb().getDocumentWithKey(key, true);
if (result != null && result.isNewNote()) {
result.replaceItemValue("Form", TERM_FORM_NAME);
result.replaceItemValue(TERM_KEY_NAME, token);
result.save();
}
return result;
}
示例5: getValueDocument
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Document getValueDocument(final CharSequence value) {
String key = caseSensitive_ ? value.toString() : value.toString().toLowerCase();
Document result = getIndexDb().getDocumentWithKey(key, true);
if (result != null && result.isNewNote()) {
result.replaceItemValue("Form", VALUE_FORM_NAME);
result.replaceItemValue(VALUE_KEY_NAME, value);
result.save();
}
return result;
}
示例6: getNameDocument
import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Document getNameDocument(final CharSequence name) {
String key = caseSensitive_ ? name.toString() : name.toString().toLowerCase();
Document result = getIndexDb().getDocumentWithKey(key, true);
if (result != null && result.isNewNote()) {
result.replaceItemValue("Form", TERM_FORM_NAME);
result.replaceItemValue("isName", "1");
result.replaceItemValue(TERM_KEY_NAME, name);
result.save();
}
return result;
}
示例7: wrapProxiedVertex
import org.openntf.domino.Document; //导入方法依赖的package包/类
public DProxyVertex wrapProxiedVertex(final Map<String, Object> delegate) {
// System.out.println("Wrapping a proxied vertex...");
DVertex vertex = new DVertex(getConfiguration().getGraph(), delegate);
Object pDelegate = getProxyStoreDelegate();
Serializable pKey = null;
Map<String, Object> proxyDelegate = null;
pKey = getKeyProperty(delegate);
if (pKey == null) {
if (delegate instanceof Document) {
pKey = ((Document) delegate).getMetaversalID();
} else {
//TODO future implementations...
}
}
if (pDelegate instanceof Database) {
Database pDb = ((Database) pDelegate);
// System.out.println("Creating proxy version in database " + pDb.getApiPath());
Document pDoc = pDb.getDocumentWithKey(pKey, true);
if (pDoc != null && pDoc.isNewNote()) {
pDoc.save();
}
proxyDelegate = pDoc;
} else {
//TODO future implementations...
}
DProxyVertex result = new DProxyVertex(getConfiguration().getGraph(), vertex, proxyDelegate);
return result;
}