Iequals()

Compares this business object's attribute values with those of the input business object.

Syntax

boolean Iequals(IBusinessObject obj2);

Parameters

obj2
The business object to compare.

Return Values

Returns true if the values of all attributes and the verbs are the same; otherwise, returns false.

Notes

The Iequals() method compares this business object's attribute values with those in the input business object. If the business objects are hierarchical, the comparison includes all attributes in the child business objects. The verbs and the attribute values must match.

In the comparison, a null value is considered equivalent to any value to which it is compared and does not prevent a return of true.

Example

The following example compares the verbs and attributes of order2 to all attributes of order1:

boolean isEqual = false;
IBusinessObject order1 =
     accessSession.IcreateBusinessObjectwithVerb("salesorder",
     "create");
IBusinessObject order2 =
     accessSession.IcreateBusinessObjectwithVerb("salesorder",
     "create");
isEqual = order1.Iequals(order2);
if(isEqual)
     System.out.println("order1 is the same as order2")
else
     System.out.println("order1 is not the same as order2");

Copyright IBM Corp. 2004, 2005