DocBook|Search
Class Reference
%Library.PopulateUtils
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%Library] >  [PopulateUtils]
Private  Storage  

class %Library.PopulateUtils

The %PopulateUtils class contains a number of utility methods used by the %Populate class.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
30


Summary

Methods
ArrayElement BuildReferenceSample BuildValueSetSQL CDate
City Color Company Counter
Currency Date ExtentValue FirstName
Float Integer LastName Mission
Name Product SSN Street
String StringMin Syllable TimeStamp
Title USPhone USState USZip
ValueList VarString


Methods

• classmethod ArrayElement(ByRef array) as %String
Return a random array element.
• classmethod BuildReferenceSample(class, sample, size=500, selpct=25)
Populate a random sample of ID values from a class.
• classmethod BuildValueSetSQL(cptr, cext, table, column, size=500, verbose As %Integer = 0) as %Status
Populate a value set from a query
• classmethod CDate(format As %Integer = 1, min As %Date = 30000, max As %Date = 55000) as %String
• classmethod City() as %String
Returns a random city name.
• classmethod Color() as %String
Returns a random color name (one of 5 possible values).
• classmethod Company() as %String
Returns a random company name.
• classmethod Counter(counter As %String = "c", initial As %Integer = 1) as %String
• classmethod Currency(min As %Integer = 0, max As %Integer = 10000) as %Integer
Returns a random currency value between min and max (if present).
• classmethod Date(min As %Date, max As %Integer) as %Date
Returns a random date value in Caché $H format.
• classmethod ExtentValue(cptr As %Integer, cext As %Integer) as %String
Return a random value from a concrete value extent.
• classmethod FirstName(gender As %String = "") as %String
Returns a string containing a random first name.

gender is a optional string used to control the gender of the generated name: 1 is Male, 2 = Female, "" is either.

• classmethod Float(min As %Float = 0, max As %Float = 10000, scale As %Integer = 0) as %Integer
Returns a random floating point value between min and max (if present).
• classmethod Integer(min As %Integer = 0, max As %Integer = 1000000000) as %Integer
Returns a random integer value between min and max (if present).
• classmethod LastName() as %String
Returns a string containing a random last name.
• classmethod Mission() as %String
Returns a string containing a randomly generated corporate mission statement.
• classmethod Name(gender As %String = "") as %String
Returns a string containing a random name as lastname,firstname.

gender is a optional string used to control the gender of the generated name: 1 is Male, 2 = Female, "" is either.

• classmethod Product() as %String
Returns a random product name (one of 4 possible values).
• classmethod SSN() as %String
Return a random U.S. Social Security Number.
• classmethod Street() as %String
Returns a random street address.
• classmethod String(len As %Integer = 1) as %String
Returns a string value of the form _ and whose length does not exceed len.
• classmethod StringMin(minlen As %Integer = 1, maxlen As %Integer = 1) as %String
Returns a random string value whose length is at least minlen and not greater than maxlen.
• classmethod Syllable(maxlen As %Integer = 30) as %String
Returns a random syllable string.
• classmethod TimeStamp(min As %TimeStamp, max As %TimeStamp) as %String
Returns a random TimeStamp value that is between the min and max timestamp values. min and max will default to "" and that allows the defaults for Date() to be used, min time will default to zero and max time defaults to 86399 (23:59:59) If min or max are not valid %TimeStamp values then the invalid value is ignored.
• classmethod Title() as %String
Returns a random Job Title.
• classmethod USPhone() as %String
Returns a random U.S. phone number.
• classmethod USState() as %String
Returns a random U.S. state abbreviation.
• classmethod USZip() as %String
Returns a random U.S. Zone Improvement Plan code.
• classmethod ValueList(vallist) as %String
Returns a random piece from a delimited list. The first character in the list is the delimiter.
• classmethod VarString(maxlen As %Integer = 1) as %String
Returns a random string value of random length up to maxlen characters.