Home > Class Reference > %SYS namespace > Config.GenericMapMethods

Config.GenericMapMethods

class Config.GenericMapMethods extends Config.CommonMethods

This class contains methods which are common (inherited) by classes which manipulate namespace mappings in the CPF file.

Method Inventory

Parameters

parameter CAPITALNAME = 0;
Determines if the Name specified in the index should be capitalized.
parameter SECTIONTYPE = 3;
This parameter governs how the class creates audit records.
Value = 0 - Class contains a single entry (SQL, Net, etc.)
Value = 1 - Class contains multiple entries (Databases, Namespaces, etc.)
Value = 2 - Class deals with mappings (MapGlobals, MapRoutines, MapPackages.)

Methods

classmethod Delete(ID As %String, Name As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status
Delete a mapping from a CPF file.

Parameters:
Namespace - Namespace to delete the mapping from.
Name - Name of the mapping to delete.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file.
Flags - Bit string of options to perform. See the Create() method for values.

Return values:
CPFFile (byref) - Name of the CPF file the modification was made in.
classmethod Exists(ID, Name As %String, ByRef Obj As %ObjectHandle, ByRef Status As %Status, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Boolean
Checks for the existence of a mapping in a CPF file.

Parameters:
Namespace - Namespace of the mapping.
Name - Name of the mapping to check existence of.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file.
Flags - Bit string of options to perform if the object is later saved with the %Save() method. See the Create() method for values.

Return values:
If Value of the method = 0 (Mapping does not exist, or some error occured)
Obj = Null
Status = Mapping "x" does not exist, or other error message

If Value of the method = 1 (Mapping exists)
Obj = Object handle to Mapping
CPFFile = Name of the CPF file the properties were retrieved from.
Status = MapGlobal "x" already exists

classmethod Get(ID As %String, Name As %String, ByRef Properties As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status
Get a mapping's properties from a CPF file.

Parameters:
ID - ID of the mapping.
Name - Name of the instance within the mapping to retrieve.
CPFFile - Name of the CPF file to use, Default=current active CPF file.

Return values:
Properties (byref) - List of the properties in Properties(Name)=Value format. See the subclass for a list of valid properties.
CPFFile (byref) - Name of the CPF file the properties were retrieved from.
classmethod GetList(ID As %String, Name As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status
Returns the properties from a instance of a mapping section from a CPF file by value in $list format

Parameters:
ID - Instance ID for the mapping.
Name - Name of the instance within the mapping ID to retrieve.
CPFFile - Name of the CPF file to use, Default=current active CPF file.

Return value:
      $lb(%Status,Result)
      where Result=$LB($LB(property name,value),...) for each property in the instance of the section
classmethod Modify(ID As %String, Name As %String, ByRef Properties As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status
Modify a mapping in a CPF file.

Parameters:
Namespace - Namespace of the mapping.
Name - Name of the mapping to modify.
Properties (byref) - List of the properties to modify in Properties(Name)=Value format. See the subclass for a list of valid properties. If a specific property is not passed in the properties array, the value is not modified.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file.
Flags - Bit string of options to perform. See the Create() method for values.


Return values:
CPFFile (byref) - Name of the CPF file the modification was made in.
classmethod Open(ID As %String, Name As %String, ByRef CPFFile As %String = "", concurrency As %Integer = -1, ByRef Status As %Status, Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %ObjectHandle
Open an instance of a mapping object in a CPF file.

Parameters:
Name - Name of the mapping to open
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file.
Flags - Bit string of options to perform if the object is later saved with the %Save() method. See the Create() method for values.

Return Values:
CPFFile (byref) - Name of the CPF file the object was opened in.

Inherited Methods

Subclasses