Retrieving Data

Service operation classes that support retrieving data contain methods to retrieve Cobra data. These methods accept a filter class as a parameter. The filter class contains options that indicate the behavior of retrieving data.

CreatingFilter Classes

Service operation classes have methods to create an instance of filter classes. In the ProcessLogOperations class, the method is:

CreateProcessLogFilter()

Calling this method returns the filter class.

// Create an instance of ProcessLogFilter class.
ProcessLogFilter processLogFilter = processLogOps.CreateProcessLogFilter();

Once you have the instance of the filter classes, you can assign values to the options which are the properties of the class. For example, to retrieve the process log file of a particular Process Log Uid, you need to specify the Uid in the instance of ProcessLogFilter class.

processLogFilter.Uid = advCalResult.ProcessLogUid;

Calling on the Operations to Retrieve Data

Service operations classes that support retrieving data contain methods to retrieve data. For example, in the ProcessLogOperations class, there is a method called GetProcessLogs(). This method accepts a filter class and an instance of the ProcessLogFilter class.

// Retrieve process log files.
IEnumerable<ProcessLog> processLogs = processLogOps.GetProcessLogs(processLogFilter);

Examining Entity Classes

The data retrieved in the Cobra Web Service Client API is stored in an enumerable list of an entity class:

// Retrieve process log files.
IEnumerable<ProcessLog> processLogs = processLogOps.GetProcessLogs(processLogFilter);

In this example, the ProcessLog class is an entity class that represents the process log file. You can examine the properties of the entity classes for the actual data.