The JavaDoc documentation for the search method suggests the following: IAPIObject[] obj = sparseData.getByRange(0,Integer.MAX_VALUE); int returnedObjects = obj.length; However, this actually is more restricted than the syntax suggests. In fact, the example would read as follows: IAPIObject[] obj = sparseData.getByRange(0,1000); int returnedObjects = obj.length; This will now retrieve up to 1000 objects. The 1000 limit may be increased using an additional entry in the eserver.conf file. For example, to increase the value to 2000, do the following: cleartrust.eserver.api.max_object_count=2000 This approach must be used with caution, as inappropriate tuning may lead to implications in other parts of the overall system. Another approach is to use a series of queries to retrieve all the desired objects, for example: boolean moreEntries=true; int startVal=0; int maxRange=1000; IUserSearch userS = myServerProxy.searchUserObjects(); ISparseData userISData = userS.search(); while (moreEntries) { int endVal=startVal+maxRange; Object[] userOb = userISData.getByRange(startVal,endVal); System.out.println("Number =" + userOb.length+ ", Start at "+startVal+", end at "+endVal); if (userOb.length==0) moreEntries=false; // //TODO: Code to do the actual work on each object // startVal=endVal; }
|