Previous Topic: Java Wrapper ClassesNext Topic: Report List Class


Report Selection Item Class

The Report Selection Item class, OmReportSelectionItem, holds selection criteria. An object of the type OmReportSelectionItem represents a single selection criteria that are specified by a name and a value or a range of values that are specified as a two-part string delimited by a comma.

The Report List and Index List Web Services support the optional specification of selection criteria. If selection criteria are specified and the web services are invoked using the provided Java wrappers, the wrappers expect the criteria that are specified as an array of one or more OmReportSelectionItem.

Programs that use the OmReportSelectionItem class must include the following import statement in Java code:

import com.ca.omgmt.client.OmReportSelectionItem;

Methods

The following list describes the methods of the OmReportSelectionItem Class:

constructor

The default constructor for the class.

Parameter: none

constructor

The constructor for class that creates the object of type OmReportSelectionItem and initializes the name and the value.

Parameter:name: String value: String

setName

Sets the name for this selection criteria object.

Parameter:name: String

getName

Returns a string with the name specified for this selection criteria object.

Parameter:none

setValue

Sets the value for this selection criteria object

Parameter:value: String

getValue

Returns a string with the value specified for this selection criteria object.

Parameter:none

Code Samples

The following code sample creates two selection criteria, one for the RID field and the other with a cross- report index name using the OmReportSelectionItem constructor, to set the name and values for each selection criteria:

OmReportSelectionItem[] byCriteria =   new OmReportSelectionItem[2];
byCriteria[0] = new OmReportSelectionItem("RID","C*");
byCriteria[1] = new OmReportSelectionItem("CRXNAME","ACCOUNT,MONTH");

The following code sample creates two selection criteria, one for LINES and the other for DOC_TYPE using the setName and setValue methods, to set the values for each selection criteria:

OmReportSelectionItem[] byCriteria =   new OmReportSelectionItem[2];
byCriteria[0].setName("LINES");
byCriteria[0].setValue("1,50");
byCriteria[1].setName("DOC_TYPE");
byCriteria[1].setValue("TEXT");