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
分享到:
相关推荐
How can we use a class Foo in a header file without access to its definition? We can declare data members of type Foo* or Foo&. We can declare (but not define) functions with arguments, and/or ...
* put: `true|false|["foo", "bar"]|function` — whether elements can be added from other lists, or an array of group names from which elements can be taken. * revertClone: `boolean` — revert cloned ...
• How hard is it to learn the interface and write a simple program that uses tablet input? • Can programmers of complex applications control the features they need? • Are more powerful tablet ...
R uses generic functions to handle different types of objects and perform specific actions based on the class of the object. For example, the `print()` function can print the contents of various types...
Don't forget to mention your name, street address, EMail and web site. Contributions: -------------- ICS has been designed by Fran鏾is PIETTE but many other peoples are working on the components ...
PEP 366: Explicit Relative Imports From a Main Module PEP 370: Per-user site-packages Directory PEP 371: The multiprocessing Package PEP 3101: Advanced String Formatting PEP 3105: print As a ...