title: Fetch a Filenet document with Properties
body: <p>I'm trying to do a test program deal with Filenet Documents. I know how to get a document Instance with <code>Object Id</code> or <code>path</code> like ,</p>
  
  <pre><code>doc  =  Factory.Document.fetchInstance(os,ID,null);
  doc  =  Factory.Document.fetchInstance(os,path,null);
  </code></pre>
  
  <p>but I like to add more finding options so I can fetch, 
  Document with name or a custom property . I am trying out this search as a approach to that:</p>
  
  <pre><code>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);
  </code></pre>
  
  <p>But ID is not a Document property , it's a System property. How can I get the document? How can I get the <code>path</code> or <code>id</code> with a Search and fetch this document ? Is there a fast way ? </p>