Sun WBEM SDK Developer's Guide

Using Optional Arguments to Filter Returned Classes and Instances

The association methods also take the following optional arguments, which filter the classes and instances that are returned. Each optional parameter value passes its results to the next parameter for filtering until all arguments have been processed.

You can pass values for any one or a combination of the optional arguments. You must enter a value for each parameter. The assocClass, resultClass, role, and resultRole arguments filter the classes and instances that are returned. Only the classes and instances that match the values specified for these parameters are returned. The includeQualifiers, includeClassOrigin, and propertyList arguments filter the information that is included in the classes and instances that are returned.

The following table lists the optional arguments to the association methods:

Table 4–8 Optional Arguments to the Association Methods

Argument 

Type 

Description 

Value 

assocClass

String 

Returns target objects that participate in this type of association with the source CIM class or instance. If Null, does not filter returned objects by association. 

Valid CIM association class name or Null. 

resultClass

String 

Returns target objects that are instances of the resultClass or one of its subclasses, or objects that match the resultClass or one of its subclasses.

Valid name of a CIM class or Null. 

role 

String 

Specifies the role played by the source CIM class or instance in the association. Returns the target objects of associations in which the source object plays this role. 

Valid property name or Null. 

resultRole 

String 

Returns target objects that play the specified role in the association. 

Valid property name or Null. 

includeQualifiers

Boolean 

If true, returns all qualifiers for each target object (qualifiers on the object and any returned properties). If false, returns no qualifiers. 

True or False. 

includeClassOrigin 

Boolean 

If true, includes the CLASSORIGIN attribute in all appropriate elements in each returned object. If false, excludes CLASSORIGIN attributes. 

True or False. 

propertyList 

String array 

Returns objects that include only elements for properties on this list. If an empty array, no properties are included in each returned object. If NULL, all properties are included in each returned object. Invalid property names are ignored.  

If you specify a property list, you must specify a non-Null value for resultClass.

An array of valid property names. an empty array, or Null.