%ExtentMgr.GUID
persistent class %ExtentMgr.GUID extends %Library.Persistent [ Final ]
SQL Table Name: %ExtentMgr.GUID
GUID,OID value pairs are recorded in ^OBJ.GUID. %ExtentMgr.GUID is a persistent class that models ^OBJ.GUID. This class can be queried using SQL. It is also a fully functioning persistent class with the GUID as the ID value. The OID property is swizzle-able. Instances of this class can be deleted and updated. New instances can be created.
This class defines two indexes.
SAMPLES>set person = ##class(Sample.Person).%OpenId(5) SAMPLES>write "Exists: ",##class(%ExtentMgr.GUID).idxOIDExists(person.%Oid(),.id),", GUID: ",id Exists: 1, GUID: A7413A9A-F73C-11DF-BF93-23DF9B6F8200 SAMPLES>Remember, OIDs are meant to be opaque values and simply constructing an OID value using $ListBuild is breaking encapsulation and it might not produce the desired results. For example:
SAMPLES>write "Exists: ",##class(%ExtentMgr.GUID).idxOIDExists($ListBuild(5,"Sample.Person"),.id),", GUID: ",id Exists: 0, GUID: SAMPLES>
Property Inventory
Method Inventory
Properties
property GUID as %Library.Binary [ Required ];
Property methods: GUIDGet(), GUIDGetStored(), GUIDIsValid(), GUIDSet()
property OID as %Library.Persistent (CLASSNAME = 1) [ Required ];
Property methods: OIDGet(), OIDGetObject(), OIDGetObjectId(), OIDGetStored(), OIDGetSwizzled(), OIDIsValid(), OIDNewObject(), OIDSet(), OIDSetObject(), OIDSetObjectId(), OIDUnSwizzle()
Methods
classmethod GetGUID(pOID As %Library.Binary = "") as %Library.Binary [ SQLProc = GetGUID ]
Projected as the stored procedure: GetGUID
GetGUID returns a GUID value registered to the object whose OID is pOID. If no
GUID is currently assigned to that object or if pOID is NULL then NULL is returned.
classmethod idxOIDExists(pOID As %Library.Binary = "", ByRef id As %String = "") as %Boolean
idxOIDExists()
This method returns true if a GUID exists whose OID matches the pOID value passed
in by the caller. The optional byref id parameter will contain the id matching the object that
was found to match the index key value upon a successful return.
Indexes
index (idxGUID on GUID) [IdKey, Type = key];
Index methods: idxGUIDCheck(), idxGUIDDelete(), idxGUIDExists(), idxGUIDOpen(), idxGUIDSQLCheckUnique(), idxGUIDSQLExists(), idxGUIDSQLFindPKeyByConstraint(), idxGUIDSQLFindRowIDByConstraint()
index (idxOID on OID) [Data = GUID, Type = key, Unique];
Index methods: idxOIDCheck(), idxOIDCheckUnique(), idxOIDDelete(), idxOIDExists(), idxOIDOpen(), idxOIDSQLCheckUnique(), idxOIDSQLExists(), idxOIDSQLFindPKeyByConstraint(), idxOIDSQLFindRowIDByConstraint()
Inherited Members
Inherited Methods
- %%CLASSNAMELogicalToStorage()
- %%CLASSNAMEStorageToLogical()
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %ComposeOid()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %InsertBatch()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %KillExtentData()
- %LoadFromMemory()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
Storage
Storage Model: Storage (%ExtentMgr.GUID)
^OBJ.GUID(0)(ID) |
= | OID |