Class Reference
%Library.Populate
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%Library] >  [Populate]
Private  Storage

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:

  1. Create a persistent object class, such as Employee.
  2. Add %Populate to the end of the class' super class list:
    	super = %Persistent,%Populate
  3. Save and compile the class.
  4. %Populate will add a class method, Populate(), to your class.
Run this method to create instances of your class in the database:
	Do ##class(Employee).Populate(100)

For more information refer to The Caché Populate Utility.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 3


Summary

Methods
OnPopulate Populate PopulateSerial

Subclasses
%BI.Miner %Identity.Data.MPI

Parameters

• parameter POPSPEC;
The POPSPEC parameter provides a way to control how %Populate generates data for properties.

For more information refer to The Caché Populate Utility.


Methods

• abstract method OnPopulate() as %Status
• classmethod Populate(count As %Integer = 10, verbose As %Integer = 0, DeferIndices As %Integer = 1, ByRef objects As %Integer = 0, tune As %Integer = 1) as %Integer
Creates up to count instances an object and stores them in the database.

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 TuneTable^%apiSQL is called after the instances of the class have been created.

Returns the number of instances successfully created.

For more information refer to The Caché Populate Utility.

• classmethod PopulateSerial() as %String
Create a single instance of a serial object.