Dmy*_*kyi 1 lotus-notes lotusscript lotus-domino xpages
我需要从数据库中读取一个属性:模板版本是.
我试过了:
有人知道怎么做吗?谢谢。
这是使用 Java 获取模板版本的方便代码片段:
private static String getVersionNumber(Database db) {
NoteCollection noteCollection;
noteCollection = db.createNoteCollection(true);
noteCollection.setSelectSharedFields(true);
noteCollection.setSelectionFormula("$TITLE=\"$TemplateBuild\"");
noteCollection.buildCollection();
final String noteID = noteCollection.getFirstNoteID();
final Document designDoc = db.getDocumentByID(noteID);
return designDoc.getItemValueString("$TemplateBuild");
}
Run Code Online (Sandbox Code Playgroud)
同样,您可以获得模板构建日期:
private static Date getBuildDate(Database db) {
NoteCollection noteCollection;
noteCollection = db.createNoteCollection(true);
noteCollection.setSelectSharedFields(true);
noteCollection.setSelectionFormula("$TITLE=\"$TemplateBuild\"");
noteCollection.buildCollection();
final String noteID = noteCollection.getFirstNoteID();
final Document designDoc = db.getDocumentByID(noteID);
return ((DateTime) designDoc.getItemValueDateTimeArray("$TemplateBuildDate").get(0)).toJavaDate();
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
55 次 |
最近记录: |