The Management Server (MS) internally uses global unique identifier (GUID) as the primary key to all records. These GUIDs therefore are very important and you often need to get it back from jRQL objects to use it further, maybe in own RQL commands.
For every jRQL class which is tight to a MS object deliver the object’s GUID from a method of this style:
Let me give some examples:
Project > getProjectGuid()
Template > getTemplateGuid()
TemplateElement > getTemplateElementGuid()
Page > getPageGuid()
AuthorizationPackage > getAuthorizationPackageGuid()
PublicationPackage > getPublicationPackageGuid()
Special are the main classes CmsClient and Project, because they encapsulate the session information additionally. For you own RQL command (or other reasons) you can get the session information back as following:
CmsClient > getLogonGuid()
Project > getSessionKey()
Please have in mind, that a session key is only available if you enter a MS project like it is in SmartTree and SmartEdit. Project still can be used in jRQL as it would be in ServerManager. In that case no session key is available and using a method requiring a session key will throw a MissingSessionKeyException.