我正在嘗試使用Filenet文檔執行測試程序。我知道如何獲得一個文檔實例與Object Id
或path
一樣,使用屬性獲取Filenet文檔
,但我想補充更多的發現選擇這樣我就可以獲取, 文檔與名稱或自定義屬性。我試圖通過這種搜索作爲一種方法:
String mySQLString = "SELECT * FROM DEMO WHERE DocumentTitle LIKE '"+prp+"'";
SearchSQL sqlObject = new SearchSQL();
sqlObject.setQueryString(mySQLString);
// System.out.println(mySQLString);
SearchScope searchScope = new SearchScope(os);
RepositoryRowSet rowSet = searchScope.fetchRows(sqlObject, null, null, new Boolean(true));
Iterator ppg = rowSet.iterator();
if (ppg.hasNext()) {
RepositoryRow rr = (RepositoryRow) ppg.next();
System.err.println(rr.getProperties());
Properties properties = rr.getProperties();
String ID = properties.getStringValue("ID");
System.out.println(ID);
doc = Factory.Document.fetchInstance(os,ID,null);
但是,ID不是一個Document屬性,它是一個System屬性。我如何獲取文檔?如何通過搜索並獲取此文檔獲得path
或id
?有一個快速的方法嗎?