allInstances

allInstances(objArray:          ObjectArray;
             maxInsts:          Integer64;
             includeSubclasses: Boolean);

The allInstances method of the Class class adds all persistent instances of the receiver class to the array specified in the objArray parameter. (Note that the object array is not cleared before instances are added.)

The maxInsts parameter specifies the maximum number of instances returned in the objArray parameter.

The maximum value for the maxInsts parameter is 4,294,967,295 (2^32-1), which corresponds to the maximum number of entries that can be stored in the objArray collection.

If the includeSubclasses parameter is set to true, all subclasses of the receiver class are also included in the array.

As the JADE Inspector uses the allInstances method, it is therefore subject to these restrictions. See also "Caveat When Handling Persistent Class Instances", earlier in this section.

The following is an example of the allInstances method in which there is no maximum number of instances and logic is requesting instances of Company and its subclasses.

Company.allInstances(coll, 0, true);