< Previous | Next >

Session and Entity objects

The two primary points of entry to Rational® ClearQuest® through the API are the Session and Entity objects.

About this task

A Session object provides methods for logging on to the user database, viewing records (entities), and creating queries. The Session object is primarily used to create new records or queries, edit existing records, view information about the database. Another way to think about a Session object would be the Rational ClearQuest client functionality.

The Session object represents the current database-access session and is the starting point of all operations. If you are writing hooks, access to the current Session object is provided through the GetSession method of the Entity object. Because hooks operate in the context of modifying a record (entity), you always have a corresponding Entity object from which to call GetSession.

If you are writing an external application to access Rational ClearQuest databases, you must create a Session object and log in to the database. To work with an entity, you must then call the API that returns the entity object.

The Session object is the entry point for accessing Rational ClearQuest user databases. For Rational ClearQuest hooks, a Session object is created automatically when a user logs on to the database, and is available through the Entity object. If you are writing an external application, you must create a Session object and use it to log on to a database.

< Previous | Next >