How to get Document class names from a objectstore

      How to get Document class names from a objectstore
SearchScope searchScope = new SearchScope(objectStore);
           String query = "SELECT SymbolicName FROM DocumentClassDefinition WHERE IsHidden = FALSE AND IsSystemOwned = FALSE";
   
           SearchSQL sql= new SearchSQL();
           sql.setQueryString(query);
         
            
           Integer myPageSize = new Integer(100);
         PropertyFilter propertyFilter = new PropertyFilter();
         propertyFilter.setMaxRecursion(1);
         propertyFilter.addIncludeType(1, null, null, FilteredPropertyType.ANY, null);
         Boolean continuable = new Boolean(true);
         RepositoryRowSet rowSet =  searchScope.fetchRows(sql, myPageSize, propertyFilter, continuable);

         
         if(rowSet.isEmpty()) {
                throw new Exception();
                
         } else {
             Iterator iterator = rowSet.iterator();
                  
             while (iterator.hasNext()) {
                i++;
                RepositoryRow row = (RepositoryRow) iterator.next();
                System.out.println(row.getProperties().getStringValue("SymbolicName"));
             }
         }



String query = "SELECT SymbolicName, Id, IsHidden, IsSystemOwned, This FROM DocumentClassDefinition WHERE AllowsSubclasses=TRUE AND IsSystemOwned=FALSE AND IsHidden=FALSE";



URL : http://www.ecmplace.com/viewtopic.php?f=39&t=14374&p=43265#p43265

你可能感兴趣的:(document)