%Library.Populate
abstract class %Library.Populate
%Populate is a utility class that provides the ability to create instances of an object populated with random data.To use the %Populate class do the following:
- Create a persistent object class, such as Employee.
- Add %Populate to the end of the class' super class list:
super = %Persistent,%Populate
- Save and compile the class.
- %Populate will add a class method, Populate(), to your class.
Do ##class(Employee).Populate(100)
For more information refer to The Caché Populate Utility.
Method Inventory
Parameters
For more information refer to The Caché Populate Utility.
Methods
If verbose is true, then details are echoed to the console.
If DeferIndices is true, then indices are sorted at the end of the operation.
If objects is true, then each object that is created is returned in the objects array
If tune is true, then $SYSTEM.SQL.TuneTable is called after the instances of the class have been created. If tune>1, then $SYSTEM.SQL.TuneTable is also called for any tables projected by persistent superclasses of this class
If deterministic is true, then the set of objects produced by identical calls to Populate at different times will be identical.
Returns the number of instances successfully created.
For more information refer to The Caché Populate Utility.