IRISLIB database
OBJ Class Reference

The <class>SYSTEM.OBJ</class> class provides an interface for managing objects. More...

Inheritance diagram for OBJ:
Collaboration diagram for OBJ:

Static Public Member Functions

_.Library.Status CloseObjects ()
 The <class>SYSTEM.OBJ</class> class provides an interface for managing objects. More...
 
_.Library.Status Compile (_.Library.String classes, _.Library.String qspec, _.Library.String errorlog, _.Library.Boolean recurse)
 Compile a class. More...
 
_.Library.Status CompileAll (_.Library.String qspec, _.Library.String errorlog)
 Compile all classes within this namespace. More...
 
_.Library.Status CompileAllNamespaces (_.Library.String qspec, _.Library.String errorlog)
 Invoke $system.OBJ.CompileAll for all the namespaces. More...
 
_.Library.Status CompileInfoClass (_.Library.String class, _.Library.String version, _.Library.String compiletime)
 Given a class this returns the version of InterSystems IRIS this was compiled on and the compiletime of this class.
 
_.Library.Status CompileList (_.Library.String list, _.Library.String qspec, _.Library.String errorlog, _.Library.String updatedlist)
 Compile a list of items specified in 'list' and separated by commas, or an array list("item.MAC")="". More...
 
_.Library.Status CompilePackage (_.Library.String package, _.Library.String qspec, _.Library.String errorlog)
 Compile all classes within the specified package. More...
 
_.Library.Status CompileProject (_.Library.String project, _.Library.String qspec, _.Library.String errorlog)
 Compile all entries in this project. More...
 
_.Library.Status Delete (_.Library.String classes, _.Library.String qspec, _.Library.String errorlog)
 Delete a class. More...
 
_.Library.Status DeleteAll (_.Library.String qspec)
 Delete all the classes in this namespace. More...
 
_.Library.Status DeletePackage (_.Library.String package, _.Library.String qspec)
 Delete all the classes within the specified package. More...
 
_.Library.Status DeleteProject (_.Library.String project, _.Library.String qspec)
 Delete the named project from this namespace. More...
 
_.Library.Status DisplayError (_.Library.Status err)
 Decode and display an object error message to the console. More...
 
_.Library.Status Dump (_.Library.String oref)
 Dump an object to the console. More...
 
_.Library.Status Export (_.Library.String items, _.Library.String filename, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset)
 Export items as an XML file. More...
 
_.Library.Status ExportAllClasses (_.Library.String filename, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset)
 Export all the classes in this namespace as one large XML file. More...
 
_.Library.Status ExportAllClassesIndividual (_.Library.String dirname, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset, _.Library.String Package, _.Library.Boolean SubDir)
 Export all the classes as individual XML files to a directory. More...
 
_.Library.Status ExportAllClassesToStream (_.Stream.Object stream, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset)
 Export all the classes in this namespace to a stream. More...
 
_.Library.Status ExportCPP (_.Library.String classname, _.Library.String dirname, _.Library.String qspec, _.Library.String errorlog)
 Export a class to C++ files. More...
 
_.Library.Status ExportJava (_.Library.String classname, _.Library.String dirname, _.Library.String qspec, _.Library.String errorlog, paths, Seen)
 Export a class to a Java file. More...
 
_.Library.Status ExportJavaPackage (_.Library.String Package, _.Library.String dirname, _.Library.String qspec, _.Library.String errorlog, paths)
 Export classes in this package to Java. More...
 
_.Library.Status ExportODL (_.Library.String classname, _.Library.String filename, _.Library.String qspec, _.Library.String errorlog)
 Export a class to ODL file. More...
 
_.Library.Status ExportPackage (_.Library.String package, _.Library.String filename, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset)
 Export a set of classes in a package as an XML file. More...
 
_.Library.Status ExportPackageToStream (_.Library.String package, _.Stream.Object stream, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset)
 Export a set of classes in a package in XML format to a stream. More...
 
_.Library.Status ExportPattern (_.Library.String pattern, _.Library.String filename, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset)
 Export all items matching a pattern to an XML file. More...
 
_.Library.Status ExportPatternToStream (_.Library.String pattern, _.Stream.Object stream, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset)
 Export all items matching a pattern in XML format to a stream. More...
 
_.Library.Status ExportToStream (_.Library.String items, _.Stream.Object stream, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset)
 Export items in XML format to a stream. More...
 
_.Library.Status ExportUDL (_.Library.String itemname, _.Library.String filename, _.Library.String qspec, _.Library.String errorlog, _.Library.String Charset)
 Export a class or routine in UDL format. More...
 
_.Library.Status GenerateEmbedded (_.Library.String list, _.Library.String qspec, _.Library.String errorlog, _.Library.Boolean delete)
 Generate embedded SQL cached queries (UCQ) for all routines that match the list passed in. More...
 
_.Library.Status GetClassList (_.Library.String items, _.Library.String qspec)
 Return an array of classes in this namespace. More...
 
_.Library.Integer GetConcurrencyMode ()
 Return the current Object Concurrency mode.
 
_.Library.Status GetDependencies (_.Library.String class, _.Library.String included, _.Library.String qspec)
 This will return a list of classes the class compiler will include if the listed classes are compiled. More...
 
_.Library.Status GetMPPOption (_.Library.String optionName, _.Library.Status tSC, _.Library.Integer getGloValue)
 Get the current value for the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName'. More...
 
_.Library.Status GetPackageList (_.Library.String items, _.Library.String package, _.Library.String qspec)
 Return an array of classes in this package. More...
 
_.Library.String GetQualifiers (_.Library.Boolean system)
 Get the default qualifiers for this namespace or this system. More...
 
_.Library.Integer GetTransactionMode ()
 Return the current Object transaction mode.
 
 ImportDir (_.Library.String dir, _.Library.String wildcards, _.Library.String qspec, _.Library.String errorlog, _.Library.Boolean recurse, _.Library.String imported, _.Library.Boolean listonly, _.Library.String selectedlist)
 Import and optionally compile all items in a directory. More...
 
_.Library.Boolean IsUpToDate (_.Library.String class, _.Library.Boolean log, _.Library.Integer type)
 For classes in a read/write database, return 1 if this class is up to date (or 0 if it is not). More...
 
_.Library.Status IsValidClassname (_.Library.String class)
 Return $$OK if this class name is valid, or an error message if it is not. More...
 
_.Library.Status Load (_.Library.String file, _.Library.String qspec, _.Library.String errorlog, _.Library.String loadedlist, _.Library.Boolean listonly, _.Library.String selecteditems, _.Library.String displayname, _.Library.String charset, _.Library.String description)
 Load a file from disk. More...
 
_.Library.Status LoadDir (_.Library.String dir, _.Library.String qspec, _.Library.String errorlog, _.Library.Boolean recurse, _.Library.String loadedlist)
 Load all class definitions in a directory. More...
 
_.Library.Status LoadLanguage (_.Library.String language, _.Library.String qspec)
 Import the system messages for the specified language from ...\mgr\Locale\allmessages_[language].xml. More...
 
_.Library.Status LoadStream (_.Library.AbstractStream stream, _.Library.String qspec, _.Library.String errorlog, _.Library.String loadedlist, _.Library.Boolean listonly, _.Library.String selecteditems, _.Library.String displayname, _.Library.String charset)
 Load a stream. More...
 
_.Library.Status MakeClassDeployed (_.Library.String classes, _.Library.String qspec, _.Library.Boolean fulldeploy)
 Make a class or classes deployed. More...
 
_.Library.ObjectHandle New (_.Library.String ClassName)
 Create a new object instance. More...
 
_.Library.ObjectHandle Open (_.Library.String ClassName, _.Library.String oid)
 Open a persistent object instance. More...
 
_.Library.ObjectHandle OpenId (_.Library.String ClassName, _.Library.String id)
 Open a persistent object instance. More...
 
_.Library.Status RebuildExtentIndex (_.Library.Boolean updateMode, _.Library.Integer lockMode)
 
_.Library.Status RebuildExtentIndexOne (className, _.Library.Integer lockMode)
 
 RedirectBindSrvUserOutput (_.Library.Boolean val)
 Turn output redirection on and off in the binding server.
 
_.Library.Status SaveObjects ()
 Save all instances of Library.Persistent in the process. More...
 
_.Library.Integer SetConcurrencyMode (_.Library.Integer value, _.Library.Status pStatus)
 Set the Object concurrency mode for the current process to a new value. More...
 
_.Library.String SetFlags (_.Library.String flags, _.Library.Boolean system)
 Set the default flags for this namespace or this system. More...
 
_.Library.Status SetMPPOption (_.Library.String optionName, _.Library.Integer optionValue, _.Library.String oldValue)
 Set the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName' to the specified 'optionValue'. More...
 
_.Library.Status SetQualifiers (_.Library.String qspec, _.Library.Boolean system, _.Library.String group)
 Set the default qualifiers for this namespace or this system. More...
 
_.Library.Integer SetTransactionMode (_.Library.Integer value, _.Library.Status pStatus)
 Set the object transaction mode for the current process to a new value. More...
 
_.Library.Status ShowClasses (_.Library.String qspec)
 Write all classes defined in this namespace to the console. More...
 
 ShowFlags ()
 Display the list of flags used by the compiler. More...
 
 ShowMacros ()
 Display the list of supported macros defined in the system.
 
_.Library.Status ShowObjects (_.Library.String qspec)
 Write all object instances in this process to the console. More...
 
 ShowQualifiers (_.Library.String group)
 Display the list of qualifiers defined in the system. More...
 
 ShowReferences (_.Library.String oref, _.Library.Boolean chkObj)
 Display a list of all variables that contain a reference to this oref. More...
 
_.Library.Status UnCompile (_.Library.String classes, _.Library.String qspec)
 Uncompile a class or classes. More...
 
_.Library.Status UpdateConfigParam (_.Library.String classname, _.Library.String parameter, _.Library.String value)
 Allows updating a CONFIGVALUE parameter type. More...
 
_.Library.Status Upgrade (_.Library.String qspec, _.Library.String errorlog, _.Library.String classname)
 Upgrade the class definition database in one namespace. More...
 
_.Library.Status UpgradeAll (_.Library.String qspec, _.Library.String errorlog)
 Upgrade the class definition database in all the namespaces. More...
 
_.Library.Status ValidateIndices (_.Library.String classname, _.Library.String idxList, _.Library.Boolean autoCorrect, _.Library.Integer lockOption, _.Library.Boolean multiProcess, _.Library.Boolean verbose, _.Library.String errors)
 Validate indices for a class. More...
 
_.Library.String Version ()
 Return the version number of the current object library.
 
- Static Public Member Functions inherited from Help
_.Library.String Help (_.Library.String method)
 This is a helper class that is used by the various SYSTEM classes to provide a Help method. More...
 

Detailed Description

The <class>SYSTEM.OBJ</class> class provides an interface for managing objects.

You can use it via the special $system object:

Do $system.OBJ.Load("MyFile.xml","ck")

Many methods in this class use the qspec argument, which is a list of flags or qualifiers. See System Flags and Qualifiers.

Member Function Documentation

◆ CloseObjects()

_.Library.Status CloseObjects ( )
static

The <class>SYSTEM.OBJ</class> class provides an interface for managing objects.

You can use it via the special $system object:

Do $system.OBJ.Load("MyFile.xml","ck")

Many methods in this class use the qspec argument, which is a list of flags or qualifiers. See System Flags and Qualifiers.

Deprecated function, to close objects let them go out of scope.

◆ Compile()

_.Library.Status Compile ( _.Library.String  classes,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.Boolean  recurse 
)
static

Compile a class.

Compiles the class classes, which can be a single class, a comma separated list, a subscripted array of class names. You can also use ? or * wild cards and if you wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*,'User.T*". If recurse is true then do not output the intial 'compiling' message or the compile report as this is being called inside another compile loop.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

◆ CompileAll()

_.Library.Status CompileAll ( _.Library.String  qspec,
_.Library.String  errorlog 
)
static

Compile all classes within this namespace.

By default it will not compile classes mapped from another database unless the qualifier '/mapped=1' is provided.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

◆ CompileAllNamespaces()

_.Library.Status CompileAllNamespaces ( _.Library.String  qspec,
_.Library.String  errorlog 
)
static

Invoke $system.OBJ.CompileAll for all the namespaces.


Parameters

NameDescription
qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

The return value is a Status value indicating success or failure.

◆ CompileList()

_.Library.Status CompileList ( _.Library.String  list,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  updatedlist 
)
static

Compile a list of items specified in 'list' and separated by commas, or an array list("item.MAC")="".

You can also use ? or * wild cards and if you

wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*.cls,'User.T*.cls". Each item on the list is sufixed by the type of item it is so to compile a class and a routine you could specify 'class.cls,routine.mac' The order of compilation is INT, CLS, MAC, CSR, CSP.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. Note that while /mapped=0 qualifier applies to the pattern passed in by only searching the default routine database, however any compile is done in the current namespace. So it is possible a routine/class found with /mapped=0 may not be visible in the current namespace or may be a different version if there are complicated package mappings.

◆ CompilePackage()

_.Library.Status CompilePackage ( _.Library.String  package,
_.Library.String  qspec,
_.Library.String  errorlog 
)
static

Compile all classes within the specified package.


Parameters

NameDescription
package

You can pass one or more comma separated packages in package argument.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

The return value is a Status value indicating success or failure.

◆ CompileProject()

_.Library.Status CompileProject ( _.Library.String  project,
_.Library.String  qspec,
_.Library.String  errorlog 
)
static

Compile all entries in this project.


Parameters

NameDescription
project

The name of the package to be compiled.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

The return value is a Status value indicating success or failure.

◆ Delete()

_.Library.Status Delete ( _.Library.String  classes,
_.Library.String  qspec,
_.Library.String  errorlog 
)
static

Delete a class.

Delete the definition of class classes from this namespace which can be a single class, a comma separated list, a subscripted array of class names. You can also use ? or * wild cards and if you wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*,'User.T*". If the class to delete is persistent include the 'e' flag or '/deleteextent' qualifier to delete the extent data and extent metadata. Refer to <class>ExtentMgr.Util</class> for more information on extent metadata.

Parameters

NameDescription
classes

The class, a comma separated list of classes or a subscripted array of class names. Wild cards may be specified.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

The return value is a Status value indicating success or failure.

◆ DeleteAll()

_.Library.Status DeleteAll ( _.Library.String  qspec)
static

Delete all the classes in this namespace.


Parameters

NameDescription
qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

The return value is a Status value indicating success or failure.

◆ DeletePackage()

_.Library.Status DeletePackage ( _.Library.String  package,
_.Library.String  qspec 
)
static

Delete all the classes within the specified package.

Note that this ignores the '/mapped' qualifier as if you know the exact package name it is assumed you wish to delete it even if the package is mapped from another database.

Parameters

NameDescription
package

You can pass one or more comma separated packages in package argument. If package is '*' then all classes are deleted.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

The return value is a Status value indicating success or failure.

◆ DeleteProject()

_.Library.Status DeleteProject ( _.Library.String  project,
_.Library.String  qspec 
)
static

Delete the named project from this namespace.


Parameters

NameDescription
project

The name of the project to delete.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

The return value is a Status value indicating success or failure.

◆ DisplayError()

_.Library.Status DisplayError ( _.Library.Status  err)
static

Decode and display an object error message to the console.

If err is omitted, display the last generated object error.

◆ Dump()

_.Library.Status Dump ( _.Library.String  oref)
static

Dump an object to the console.

Write the in-memory state of a object referred to by oref to the console (the current device).

Set person = ##class(Person).OpenId(22) Do $system.OBJ.Dump(person)

◆ Export()

_.Library.Status Export ( _.Library.String  items,
_.Library.String  filename,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset 
)
static

Export items as an XML file.


Parameters

NameDescription
items

The items to export.

Each of the items must have a type determined by an extension selected from the following list of basic types, additional types are supported under the abstract routine interface so this list is not exhaustive.

  • CLS - Classes
  • CSP - Server Pages
  • CSR - Rule files
  • MAC - Macro routines
  • INT - Non-macro routines
  • BAS - Basic routines
  • INC - Include files
  • GBL - Globals
  • PRJ - Projects
  • OBJ - Compiled object code
  • PKG - Package definitions

If exporting multiple items, separate them with commas, pass the items("item")="" as an array. You can also use ? or * wild cards and if you wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*.cls,'User.T*.cls".

filename

If the output filename is empty, matching items will be exported to the current device.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.


If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

Charset

The character set to use for this export. If not specified then the default is 'utf-8'.

The return value is a Status value indicating success or failure.

◆ ExportAllClasses()

_.Library.Status ExportAllClasses ( _.Library.String  filename,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset 
)
static

Export all the classes in this namespace as one large XML file.

This function will loop through all the classes exporting them to the file filename. It will restrict which classes are exported based on the qspec

Parameters

NameDescription
filename

The file where exported data will be placed.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.


If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

Charset

The character set to use for this export. If not specified then the default is 'utf-8'.

The return value is a Status value indicating success or failure.

◆ ExportAllClassesIndividual()

_.Library.Status ExportAllClassesIndividual ( _.Library.String  dirname,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset,
_.Library.String  Package,
_.Library.Boolean  SubDir 
)
static

Export all the classes as individual XML files to a directory.

This function will loop through all the classes exporting each one as an individual XML file named after the classname to the directory dirname. If you specify a Package then it will only export this package. If SubDir is true then it will export sub-packages as subdirectories.

Parameters

NameDescription
dirname

The directory where exported files will be placed.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.


If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

Charset

The character set to use for this export. If not specified then the default is 'utf-8'.

Package

If you specify a Package then it will only export this package.

Subdir

If SubDir is true then it will export sub-packages as subdirectories.

The return value is a Status value indicating success or failure.

◆ ExportAllClassesToStream()

_.Library.Status ExportAllClassesToStream ( _.Stream.Object  stream,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset 
)
static

Export all the classes in this namespace to a stream.

This function will loop through all the classes exporting them to a stream. It will restrict which classes are exported based on the qspec


Parameters

NameDescription
stream

If stream is passed in then the data is appended to this stream. If it is null when called it will create a stream and return this.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.


If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

Charset

The character set to use for this export. If not specified then the default is 'utf-8'.

The return value is a Status value indicating success or failure.

◆ ExportCPP()

_.Library.Status ExportCPP ( _.Library.String  classname,
_.Library.String  dirname,
_.Library.String  qspec,
_.Library.String  errorlog 
)
static

Export a class to C++ files.

Export class classname to C++ files in directory dirname.

◆ ExportJava()

_.Library.Status ExportJava ( _.Library.String  classname,
_.Library.String  dirname,
_.Library.String  qspec,
_.Library.String  errorlog,
  paths,
  Seen 
)
static

Export a class to a Java file.

Export class classname to a JAVA file in directory dirname.

◆ ExportJavaPackage()

_.Library.Status ExportJavaPackage ( _.Library.String  Package,
_.Library.String  dirname,
_.Library.String  qspec,
_.Library.String  errorlog,
  paths 
)
static

Export classes in this package to Java.

Search for classes in the package and export them. The search for classes respects the qspec passed. If the package is "*" then it will search for all classes in this namespace.

Export class package to a JAVA file in directory dirname.

◆ ExportODL()

_.Library.Status ExportODL ( _.Library.String  classname,
_.Library.String  filename,
_.Library.String  qspec,
_.Library.String  errorlog 
)
static

Export a class to ODL file.

Export class classname to ODL file with file name filename.

◆ ExportPackage()

_.Library.Status ExportPackage ( _.Library.String  package,
_.Library.String  filename,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset 
)
static

Export a set of classes in a package as an XML file.

Export package package to an XML file with name filename.

◆ ExportPackageToStream()

_.Library.Status ExportPackageToStream ( _.Library.String  package,
_.Stream.Object  stream,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset 
)
static

Export a set of classes in a package in XML format to a stream.

Export package package to an XML file with name filename. If stream is passed in then the data is appended to this stream. If it is "" when called it will create a stream and return this.

◆ ExportPattern()

_.Library.Status ExportPattern ( _.Library.String  pattern,
_.Library.String  filename,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset 
)
static

Export all items matching a pattern to an XML file.

If you pass a pattern of '*.cls' then all classes in this namespace will be exported, or a pattern of 'a*.mac' will export all MAC routines that start with the letter 'a' to be exported. If the filename ends in .gz or .gzip it will automatically gzip the file.

Parameters

NameDescription
pattern

The pattern used to construct a list of items to be exported.

filename

If the output filename is empty, matching items will be exported to the current device.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.


If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

Charset

The character set to use for this export. If not specified then the default is 'utf-8'.

The return value is a Status value indicating success or failure.

◆ ExportPatternToStream()

_.Library.Status ExportPatternToStream ( _.Library.String  pattern,
_.Stream.Object  stream,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset 
)
static

Export all items matching a pattern in XML format to a stream.

If you pass a pattern of '*.cls' then all classes in this namespace will be exported, or a pattern of 'a*.mac' will export all MAC routines that start with the letter 'a' to be exported.

Parameters

NameDescription
pattern

The pattern used to construct a list of items to be exported.

stream

If stream is passed in then the data is appended to this stream. If it is "" when called it will create a stream and return this.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.


If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

Charset

The character set to use for this export. If not specified then the default is 'utf-8'.

The return value is a Status value indicating success or failure.

◆ ExportToStream()

_.Library.Status ExportToStream ( _.Library.String  items,
_.Stream.Object  stream,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset 
)
static

Export items in XML format to a stream.


Parameters

NameDescription
items

The items to export.

Each of the items must have a type determined by an extension selected from the following list of basic types, additional types are supported under the abstract routine interface so this list is not exhaustive.

  • CLS - Classes
  • CSP - Cache Server Pages
  • CSR - Cache Rule files
  • MAC - Macro routines
  • INT - Non-macro routines
  • BAS - Basic routines
  • INC - Include files
  • GBL - Globals
  • PRJ - Studio projects
  • OBJ - Compiled object code
  • PKG - Package definitions

If exporting multiple items, separate them with commas, pass the items("item")="" as an array. You can also use ? or * wild cards and if you wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*.cls,'User.T*.cls".

stream

The stream in which to place exported items.

qspec

qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.


If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file.

errorlog

errorlog is an array of the <class>Status</class> error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus.

Charset

The character set to use for this export. Note that if you pass in a Charset and also pass in a character stream we will not use the Charset unless the stream is a file character stream. The reason for this is a character stream deals with characters so Charset is only about binary representations of character data. In this specific case of a file character stream we will set the TranslateTable on the file stream to the Charset.

The return value is a Status value indicating success or failure.

◆ ExportUDL()

_.Library.Status ExportUDL ( _.Library.String  itemname,
_.Library.String  filename,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  Charset 
)
static

Export a class or routine in UDL format.

Export document itemname to file filename in UDL format.

◆ GenerateEmbedded()

_.Library.Status GenerateEmbedded ( _.Library.String  list,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.Boolean  delete 
)
static

Generate embedded SQL cached queries (UCQ) for all routines that match the list passed in.

This can be a pattern such as 'A*' to mean all runnable code that starts with 'A'. The qspec uses /mapped to determine if patterns should include mapped items or just local ones. Specify 1 for delete to delete the UCQ found for the routines in list.

◆ GetClassList()

_.Library.Status GetClassList ( _.Library.String  items,
_.Library.String  qspec 
)
static

Return an array of classes in this namespace.

Search for classes in this namespace and put their names into the local array items. qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. The search for classes respects the qspec passed. It uses the following qualifiers

  • /application=1/0 - Include application classes
  • /system=1/0 - Include system classes (ones with class attribute 'system' set to something other than zero)
  • /percent=1/0 - Include percent classes
  • /mapped=1/0 - Include classes mapped from other databases or just classes in default databases

◆ GetDependencies()

_.Library.Status GetDependencies ( _.Library.String  class,
_.Library.String  included,
_.Library.String  qspec 
)
static

This will return a list of classes the class compiler will include if the listed classes are compiled.

The class can be a single class, a comma separated list, a subscripted array of class names. You can also use ? or * wild cards and if you wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*,'User.T*". It returns the list of classes that will be compiled in included based on the compile qspec.

◆ GetMPPOption()

_.Library.Status GetMPPOption ( _.Library.String  optionName,
_.Library.Status  tSC,
_.Library.Integer  getGloValue 
)
static

Get the current value for the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName'.

<p style="display: block; white-space: pre; font-family: 'Courier New';">

Method: GetMPPOption Definition: This method returns the current value for the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName'

Options: The following is a list of currently supported Macro Pre-Processor Configuration Settings Options:

optionName Description


MPPParsingMode - The MPP's Parsing Mode {1 | 2} MacroMaxRecursionNoArg - The maximum allowed sub-string repetitions between $$$MACRO references (without arguments) of the same name {3...n} MacroMaxRecursionGotArg - The maximum allowed sub-string repetitions between $$$MACRO(...) references (with arguments) of the same name {10...n} ALL Get all 'optionName' values

Notes: - See the 'SetMPPOption(...)' method for specific details about each of the 'optionName' values

Invocation: This method can be invoked in the following ways: ObjectScript: $SYSTEM.OBJ.GetMPPOption(...) SQL: N/A

Examples: The following examples shows the use of this method:

#1 Get the current value for the 'MPPParsingMode' option of the Macro Pre-Processor Configuration Settings

set optVal=$SYSTEM.OBJ.GetMPPOption("MPPParsingMode",.tSC)

Data Storage: ^SYS("MPP","Parsing") & ^SYS("MPP","MacroRecursion")

Parameters: optionName - The Pre-Processor (MPP) Configuration Settings 'option' name. The following is a list of currently supported Macro Pre-Processor Configuration Settings Options:

  • MPPParsingMode
  • MacroMaxRecursionNoArg
  • MacroMaxRecursionGotArg
  • ALL (Get all 'optionName' values) tSC - A Pass By Reference (PBR) parameter which returns the status from the invocation of this method getGloValue - 0 = Don't retrieve the value from the System-Global [DEFAULT] 1 = Retrieve the value from the System-Global NOTE: This parameter should be used for internal purposes only!

RETURN Value: The current value of the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName'. NOTE: If 'optionName' is passed the value "ALL", then return a $LIST(...) of a $LIST(...) of the following values for each of the valid 'optionName' values:

$LIST($LIST(optionName,optionValue,tSC),...)

◆ GetPackageList()

_.Library.Status GetPackageList ( _.Library.String  items,
_.Library.String  package,
_.Library.String  qspec 
)
static

Return an array of classes in this package.

Search for classes in the package and put their names into the local array items. If the package is "*" then it will return for all classes in this namespace. It uses the qualfier in qspec /includesubpackages to determine if it searches inside a package to subpackages or not. qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

◆ GetQualifiers()

_.Library.String GetQualifiers ( _.Library.Boolean  system)
static

Get the default qualifiers for this namespace or this system.

If system is true, the method gets the default qualifiers for this system; otherwise it gets the default qualifiers for the current namespace.

◆ ImportDir()

ImportDir ( _.Library.String  dir,
_.Library.String  wildcards,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.Boolean  recurse,
_.Library.String  imported,
_.Library.Boolean  listonly,
_.Library.String  selectedlist 
)
static

Import and optionally compile all items in a directory.

This will import all files found in a directory using the <method>Load</method> method so it should be able to detect most common formats. If you pass it the compile flag ('c'), after loading it will also compile all these items. The other flags are the same as found in <method>Load</method> except for the dir which is the directory to load and the recurse which determines if this will look into subdirectories or not.
You can limit the items it will import by specifying a wildcards value. For example '*.xml' will only import files that end in XML.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

◆ IsUpToDate()

_.Library.Boolean IsUpToDate ( _.Library.String  class,
_.Library.Boolean  log,
_.Library.Integer  type 
)
static

For classes in a read/write database, return 1 if this class is up to date (or 0 if it is not).

If log is true then it will display a log of what it is checking. The type determines what it checks to make the determination:

  • 0 - Check timestamps on class, so even if a description was modified this will show the class as out of date
  • 1 - Ignore changes to descriptions in checking up to date status, this is the default and is what the class compiler typically uses.
  • 2 - Ignore changes to descriptions and method code in checking up to date status, this is useful to see if the class has 'structurally' changed in a way that would require a class referencing this via SQL to be recompiled

This method returns 1 if the class is in a read-only database.

◆ IsValidClassname()

_.Library.Status IsValidClassname ( _.Library.String  class)
static

Return $$OK if this class name is valid, or an error message if it is not.

If it is invalid it is typically because it contains characters that are not allowed in a class name or because it clashes with a class that already exists (different case in package say).

◆ Load()

_.Library.Status Load ( _.Library.String  file,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  loadedlist,
_.Library.Boolean  listonly,
_.Library.String  selecteditems,
_.Library.String  displayname,
_.Library.String  charset,
_.Library.String  description 
)
static

Load a file from disk.

Load, and optionally compile (if 'c' flag is present), class definitions, CSP pages, routines, or globals from the file file. file may be a list of files to load separated with '*' symbols.
You can import files exported in XML format, RO format, CDL format, UDL format, GOF, and CSR/CSP files.
A comma separated list of the items it loaded is returned in loadedlist. If the list is too long to fit in the variable, it is terminated with '...'. Items loaded are always returned as subscripts of the loadedlist array.
If you pass listonly as true then it will not import anything but just list the items that exist in file.
If selecteditems is defined then this will contain either a comma separated list of items to import or a single subscripted array. It will only import items that are in this list from the file provided, so this provides a way to limit which items get imported.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.
When loading a RO file the description variable will be filled in with the description from the RO file if there is one present.
errorlog is an array of the <class>Status</class> return values from this call, in the format returned by $system.Status.DecomposeStatus.
The displayname is normally not provided. If present it changes the 'load file XYZ' name from the filename to the displayname. This is useful when loading a stream where the stream filename is not the name of the file the user knows from a client system and we want to present a meaningful name.
If the filename ends in .gzip or .gz then we ungzip this file before loading it.

◆ LoadDir()

_.Library.Status LoadDir ( _.Library.String  dir,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.Boolean  recurse,
_.Library.String  loadedlist 
)
static

Load all class definitions in a directory.

Load and optionally compile (if 'c' flag is present) all class definitions within directory dir, this includes all .XML files. If the recurse is true then it will include subdirectories. Returns a comma separated list of the items it loaded in loadedlist and the same data also as loadedlist(name)="" in case the comma list is more than 32k. Note that this will only compile classes found in these XML files and no other types. If you want to be able to compile anything use the <method>ImportDir</method>.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

◆ LoadLanguage()

_.Library.Status LoadLanguage ( _.Library.String  language,
_.Library.String  qspec 
)
static

Import the system messages for the specified language from ...\mgr\Locale\allmessages_[language].xml.

and make this the current language. If language is not specified, then Upgrade the Object locale and import the current language.

◆ LoadStream()

_.Library.Status LoadStream ( _.Library.AbstractStream  stream,
_.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  loadedlist,
_.Library.Boolean  listonly,
_.Library.String  selecteditems,
_.Library.String  displayname,
_.Library.String  charset 
)
static

Load a stream.

Load and, optionally compile (if 'c' flag is present), class definitions, CSP pages, routines or globals from the stream stream. Returns an array of the items it loaded in loadedlist. If you pass listonly as true then it will not import anything but just list the items that exist in the stream that you supply.
If selecteditems is defined then this will contain a comma separated list of items to import (or a single subscripted array). It will only import items that are in this list from the stream provided, so this provides a way to limit which items get imported.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

◆ MakeClassDeployed()

_.Library.Status MakeClassDeployed ( _.Library.String  classes,
_.Library.String  qspec,
_.Library.Boolean  fulldeploy 
)
static

Make a class or classes deployed.

classes can be a single class, a comma separated list, a subscripted array of class names. You can also use ? or * wild cards and if you wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*,'User.T*". This will delete all the source code of the class from the disk. Once a class is in deployed mode, it can not be edited or exported or recompiled. You can still create subclasses of a deployed class and compile these. qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. If fulldeploy is true it will attempt to remove pretty much the entire class definition leaving just the minimum so the class is runnable, this will not work on persistent, serial, datatype, or XML enabled classes as these require access to the class definition at runtime in order to function. Note that for a class to be deployed it must be compiled, if you try to deploy a class which is not compiled it will report an error.

◆ New()

_.Library.ObjectHandle New ( _.Library.String  ClassName)
static

Create a new object instance.

Create a new object instance of type ClassName and return a reference (OREF) to it.

Using this method, you can dynamically create objects, that is you can determine what type of object to create at run-time.

For example:

Set obj = $System.OBJ.New("Person")

◆ Open()

_.Library.ObjectHandle Open ( _.Library.String  ClassName,
_.Library.String  oid 
)
static

Open a persistent object instance.

Load persistent object instance of type ClassName and with OID value oid from disk and return a reference (OREF) to it.

For example:

Set person = $System.OBJ.Open("Person",oid)

◆ OpenId()

_.Library.ObjectHandle OpenId ( _.Library.String  ClassName,
_.Library.String  id 
)
static

Open a persistent object instance.

Load persistent object instance of type ClassName and with ID value id from disk and return a reference (OREF) to it.

For example:

Set person = $System.OBJ.OpenId("Person",22)

◆ RebuildExtentIndex()

_.Library.Status RebuildExtentIndex ( _.Library.Boolean  updateMode,
_.Library.Integer  lockMode 
)
static

The Extent Index is an index on all persistent classes that are runnable in the current namespace. It is currently used by BuildIndices, KillExtent, and the FindGUID utility function in <class>Library.GUID</class>. Other uses may be added at a later time.

The index is maintained in the globals database in the current namespace. If the globals database in the current namespace is readonly then an error will be returned. The class compiler automatically maintains this index for classes compiled in the namespace. Classes mapped from other namespaces are not automatically added to or removed from the index when mapping changes or changes to the class runtime occur in the original namespace. Such changes must be updated in the local namespace's extent index by running a utility function. There are two functions, this function will rebuild the index completely and <method>RebuildExtentIndexOne</method> will rebuild the index entries for only the specified class.

This function returns a status value indicating success or failure.

Parameters

NameDescription
updateMode

If zero then the extent index is purged and rebuilt completely. Otherwise, the existing index is checked against existing defintions and only changed classes are rebuilt.

lockMode

Specifies the type of locking to be used while modifying the index. If the requested locks cannot be obtained then an error is reported to the caller.

0No locking;
1Exclusive lock on the entire extent index, released immediately on completion;
2The nodes for each class in the extent index are locked during update, released immediately when class's index entries are built;
3Shared lock on the entire extent index, released immediately on completion.

The return value is a Status value indicating success or failure.

◆ RebuildExtentIndexOne()

_.Library.Status RebuildExtentIndexOne (   className,
_.Library.Integer  lockMode 
)
static

This function updates the extent index for the specified class in the current namespace. If the globals database in the current namespace is readonly then an error will be returned. Call this function to rebuild the extent index for a single class in the current namespace. Refer to <method>RebuildExtentIndex</method> for more information.

This function returns a status value indicating success or failure.

Parameters

NameDescription
className

The name of the class to be indexed.

lockMode

Specifies the type of locking to be used. If the requested locks cannot be obtained then an error is reported to the caller.

0No locking;
1The nodes for each class in the extent index are locked during update, released immediately when class's index entries are built;
2The nodes for each class in the extent index are locked during update, released immediately when class's index entries are built;
3Shared lock on the class nodes in the extent index, released immediately on completion.

The return value is a Status value indicating success or failure.

◆ SaveObjects()

_.Library.Status SaveObjects ( )
static

Save all instances of Library.Persistent in the process.

Returns a status value.

◆ SetConcurrencyMode()

_.Library.Integer SetConcurrencyMode ( _.Library.Integer  value,
_.Library.Status  pStatus 
)
static

Set the Object concurrency mode for the current process to a new value.

Valid values are:

0No concurrency controls
1Atomic
2Shared
3Shared retained
4Exclusive

If a valid value is passed in then the concurrency mode for the current process will be set to that value and the previous concurrency mode value is returned. Otherwise the concurrency mode setting is left unchanged and pStatus will contain a Status value describing the error and the current concurrency mode value is returned.

◆ SetFlags()

_.Library.String SetFlags ( _.Library.String  flags,
_.Library.Boolean  system 
)
static

Set the default flags for this namespace or this system.

If system is true then this sets the default flags for this system, otherwise it sets the default flags for this namespace. If flags are set for this namespace these override any set for the system. These flags are combined with the built in defaults to create the defaults used. This method returns the new defaults after this change.

◆ SetMPPOption()

_.Library.Status SetMPPOption ( _.Library.String  optionName,
_.Library.Integer  optionValue,
_.Library.String  oldValue 
)
static

Set the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName' to the specified 'optionValue'.

<p style="display: block; white-space: pre; font-family: 'Courier New';">

Method: SetMPPOption Definition: This method sets the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName' to the specified 'optionValue'. This method also returns the original value via the PBR 'oldValue' parameter, along with the invocation status via the method's return value.

Options: The following is a list of currently supported Macro Pre-Processor Configuration Settings Options:

optionName/optionValue Description


MPPParsingMode - The MPP's Parsing Mode {1 | 2} 1 - Standard Macro Pre-Processor Parsing [$$$MPPParsingModeStandard] 2 - Enhanced Macro Pre-Processor Parsing [$$$MPPParsingModeEnhanced] This mode supports $$$MACRO[(args)] Recursion Parsing [DEFAULT: 1 = $$$MPPParsingModeDefault] MacroMaxRecursionNoArg - The maximum allowed sub-string repetitions between $$$MACRO references (without arguments) of the same name {3...n} 3 - The minimum number to determine $$$MACRO Recursive Referencing or Self-Referencing n - This number can be increased, but should never need to be for $$$MACRO references without arguments [DEFAULT: 3 = $$$MacroMaxRecursionNoArgDefault] MacroMaxRecursionGotArg - The maximum allowed sub-string repetitions between $$$MACRO(...) references (with arguments) of the same name {10...n} 10 - The minimum number to determine $$$MACRO(...) Recursive Referencing or Self-Referencing n - This number can be increased for $$$MACRO(...) references (with arguments) that may exceed 10 nesting levels, but this should be very rare Example: $$$A($$$A($$$A(...))) [DEFAULT: 10 $$$MacroMaxRecursionGotArgDefault]

Restriction: You must have the "USE" permission on the Admin Manage Resource in order to change this MPP Configuration Setting.

Notes: - Changing this MPP Configuration Setting will affect all processes immediately.

  • This is a system-wide setting.

Invocation: This method can be invoked in the following ways: ObjectScript: $SYSTEM.OBJ.SetMPPOption(...) SQL: N/A

Examples: The following examples shows the use of this method:

#1 Set the 'MPPParsingMode' option of the Macro Pre-Processor to the value two (2), which specifies the use of the Enhanced Parsing to check for $$$MACRO[(args)] Recursion:

set tSC=$SYSTEM.OBJ.SetMPPOption("MPPParsingMode",2,.oldVal)

Data Storage: ^SYS("MPP","Parsing") & ^SYS("MPP","MacroRecursion")

Parameters: optionName - The Pre-Processor (MPP) Configuration Settings 'option' name. The following is a list of currently supported Macro Pre-Processor Configuration Settings Options:

  • MPPParsingMode
  • MacroMaxRecursionNoArg
  • MacroMaxRecursionGotArg optionValue - The value to set for the specified 'optionName' oldValue - A Pass By Reference (PBR) parameter which returns the old MPP Configuration Setting value

RETURN Value: The status from the invocation of this method

◆ SetQualifiers()

_.Library.Status SetQualifiers ( _.Library.String  qspec,
_.Library.Boolean  system,
_.Library.String  group 
)
static

Set the default qualifiers for this namespace or this system.

If system is true then this sets the default qualifiers for this system, otherwise it sets the default qualifiers for this namespace. If qualifiers are set for this namespace these override any set for the system. These qualifiers are combined with the built in defaults to create the defaults used. The argument group has been deprecated.

◆ SetTransactionMode()

_.Library.Integer SetTransactionMode ( _.Library.Integer  value,
_.Library.Status  pStatus 
)
static

Set the object transaction mode for the current process to a new value.

Valid values are:

0No transactions used for Object filing
1Use transactions for Object filing

If a valid value is passed in then the transaction mode for the current process will be set to that value and the previous transaction mode value is returned. Otherwise the transaction mode setting is left unchanged and pStatus will contain a Status value describing the error and the current transaction mode value is returned.

◆ ShowClasses()

_.Library.Status ShowClasses ( _.Library.String  qspec)
static

Write all classes defined in this namespace to the console.

The optional qspec argument is a qualifier string containing any of the following options:

/detailShow details.
/hiddenShow hidden classes.
/mappedShow mapped classes.

For example:

Do $System.OBJ.ShowClasses("/detail")

◆ ShowFlags()

ShowFlags ( )
static

Display the list of flags used by the compiler.

Should use <method>ShowQualifiers</method> as flags have been superseded by qualifiers.

◆ ShowObjects()

_.Library.Status ShowObjects ( _.Library.String  qspec)
static

Write all object instances in this process to the console.

Note that some of the objects displayed may be process specific singleton objects such as classes in the SYSTEM.Context package or oref's these singleton objects themselves hold.

The optional qspec argument is a string containing any of the following characters:

/detail=1Show details.

For example:

Do $System.OBJ.ShowObjects("/detail=1")

◆ ShowQualifiers()

ShowQualifiers ( _.Library.String  group)
static

Display the list of qualifiers defined in the system.

It also shows the default qualifiers defined at system level and at namespace levels. The argument group has been deprecated.

◆ ShowReferences()

ShowReferences ( _.Library.String  oref,
_.Library.Boolean  chkObj 
)
static

Display a list of all variables that contain a reference to this oref.

If chkObj is set to 1, the properties of any varibles that contain an object reference will also be searched and displayed. Otherwise only non-object variables will be searched.
The list has the base $STACK level of the variable, the internal stack level (as shown by the STACK utility), and the variable name.

◆ UnCompile()

_.Library.Status UnCompile ( _.Library.String  classes,
_.Library.String  qspec 
)
static

Uncompile a class or classes.

classes can be a single class, a comma separated list, a subscripted array of class names. You can also use ? or * wild cards and if you wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*,'User.T*". qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.

◆ UpdateConfigParam()

_.Library.Status UpdateConfigParam ( _.Library.String  classname,
_.Library.String  parameter,
_.Library.String  value 
)
static

Allows updating a CONFIGVALUE parameter type.

If you have defined a parameter in the classname which is specified as 'CONFIGVALUE' in the type keyword then this function allows this to be updated from the original value to a new value. Note that this should be a rare event and not be used for any value that needs to be updated a lot, a global should be used for a rapidly updating value. The advantage of using a class parameter for a configuration value is that a very large number of processes can access this value using 'Set val=##class(ClassName).#ParamName' faster than access to a global.

◆ Upgrade()

_.Library.Status Upgrade ( _.Library.String  qspec,
_.Library.String  errorlog,
_.Library.String  classname 
)
static

Upgrade the class definition database in one namespace.

Pass in qspec /mapped=1 to upgrade databases mapped into current namespace or if you pass in classname we will upgrade the database associated with this specific class.

◆ UpgradeAll()

_.Library.Status UpgradeAll ( _.Library.String  qspec,
_.Library.String  errorlog 
)
static

Upgrade the class definition database in all the namespaces.

Pass in qspec /mapped=1 to upgrade databases mapped into current namespace

◆ ValidateIndices()

_.Library.Status ValidateIndices ( _.Library.String  classname,
_.Library.String  idxList,
_.Library.Boolean  autoCorrect,
_.Library.Integer  lockOption,
_.Library.Boolean  multiProcess,
_.Library.Boolean  verbose,
_.Library.String  errors 
)
static

Validate indices for a class.



Parameters:

classname
Name of the persistent class to validate indices for.
idxList
Optional. "" to check all indices, or specify a $list of index names to check. Default=""
autoCorrect
Optional. If true, correct any errors found. Default=0
lockOption
Optional. Default = 1 0 - No locking is performed at all 1 - Shared locking as each row is checked 2 - exclusive lock on entire table for duration of the run
multiProcess
Optional. If true, parts of ValidateIndices will use parallel processing when possible. Default=0
verbose
Optional. If true, display output to the current device. Default=1. When called for a sharded class, verbose is force to 0.
errors
Optional. Passed by reference. Returns an array of errors found in the index(es) validated. If autoCorrect=1, this is an array of issues corrected.

Returns: Status Code

Example: Do $SYSTEM.OBJ.ValidateIndices("Sample.Person","",1,2) Do $SYSTEM.OBJ.ValidateIndices("Sample.Company",$lb("NameIdx"),1,1)

Note::
Indices may also be validated by calling the class method ##class(classname).ValidateIndices(idxList,autoCorrect,lockOption,verbose).
There is one main difference between validating indices through $SYSTEM.OBJ.ValidateIndices() and ##class(classname).ValidateIndices().
$SYSTEM.OBJ.ValidateIndices() will validate the indices for a table, and it will also validate any indices in collection child tables for that table.

When using ##class(classname).ValidateIndices(), collection child table indices must be checked with separate calls.
Also, when calling $SYSTEM.OBJ.ValidateIndices(), multiProcess default is 0. When calling ##class(classname).ValidateIndices(), multiProcess default is 1.